Pakistan's reshaped Supreme Court has dismissed the main legal challenges to Gen Pervez Musharraf being allowed a second term as president.
He has promised to resign as army chief if and when the court validates his victory in October's presidential poll.
Gen Musharraf sacked a number of independently-minded judges who had been due to consider the case.
The judgements come a day after senior US envoy John Negroponte urged Gen Musharraf to lift emergency rule.
Mr Negroponte also urged him to free opponents ahead of elections due in January.
Gen Musharraf has insisted the emergency, imposed on 3 November, can be lifted only once the security situation improves.
President Musharraf is due to visit Saudi Arabia for talks with King Abdullah on Tuesday, the kingdom's official news agency has reported.
It would be his first trip abroad since he declared the emergency. Pakistani government officials were not immediately available for comment.
Lack of confidence
Attorney General Malik Qayyum said that five petitions against Gen Musharraf's re-election had been dismissed.
The main petitioners had said they did not recognise the new bench because it had taken oath under a provisional constitution order set up under emergency rule.
A sixth petition was brought by a civil servant, Zahoor Mahdi, who wanted to be considered eligible to stand in October's presidential election.
That petition will be heard on Thursday, the attorney general says.
Once that has happened, it is expected the court will then validate Gen Musharraf's presidency, the BBC's Barbara Plett in Islamabad says.
The legal challenge to Gen Musharraf's re-election is being heard by a new 10-member bench of the Supreme Court.
Most judges on the previous bench were either dismissed or refused to take an oath in a purge after the declaration of emergency rule.
A separate six-member bench of judges is considering two petitions challenging the emergency.
Gen Musharraf has repeatedly defended his decision to impose emergency rule, saying that if elections were held in the wrong environment, the results could lead to chaos.
He said if that happened, Pakistan's nuclear weapons could become vulnerable.
Gen Musharraf has also criticised former Prime Minister Benazir Bhutto, despite recent efforts by the two to form an alliance.
He said Ms Bhutto feared the polls, set for January, because she was corrupt and unpopular. Ms Bhutto, who was released from house arrest on Friday, has said that she will meet other opposition leaders to discuss a boycott of the elections.
The opposition says polls under emergency rule would lack credibility.
A number of opposition leaders have been detained under the emergency.
One of them, former cricket star-turned politician Imran Khan, has begun a hunger strike in jail, his spokesman said on Monday.