Pakistani human rights activists, Christian children and journalists participated in a protest rally Monday against the country's military ruler, president Gen. Pervez Musharraf, who has imposed emergency rule and restrictions upon the media in Islamabad, Pakistan. (ANJUM NAVEED ~ Associated Press)

An official in the president's office said the ruling Monday kept the general on track to quit the army by Nov. 30.

ISLAMABAD, Pakistan -- Judges hand-picked by Gen. Pervez Musharraf took just two hours Monday to quash legal challenges to his disputed re-election as president, paving the way for him to fulfill a promise to quit as army chief, perhaps by the end of the month.

The Supreme Court ruling also might make the U.S.-allied leader more inclined to ease a state of emergency that has bruised relations with opposition leader Benazir Bhutto and Washington.

Still, it further enraged his most bitter opponents, who denounced the purged court's decision as illegitimate and insisted Musharraf will have to give up power to end the political turmoil that is bedeviling the country just as Islamic militants are gaining ground.

The ruling did not certify Musharraf's election. That action by the election commission must await a ruling from the judges Thursday on a petition from a man who was blocked from being listed as a candidate on the presidential ballot put before legislators last month.

Sheikh Rashid Ahmad, a Cabinet minister close to Musharraf, said he doubted Musharraf would lift the emergency soon despite the favorable court action Monday.

But opposition parties and analysts said the ruling opened a window for the general to calm rising international and domestic pressure by easing restrictions and making it easier for politicians to campaign for Jan. 8 parliamentary elections.

"The whole country was subject to martial law only to get this decision," said Ahsan Iqbal, leader of one of Pakistan's two main opposition parties. "Now he has got his decision at gunpoint" and may soon make concessions, Iqbal said.

Musharraf said last week that he would give up the powerful post of army commander by the end of the month, assuming he was given the go-ahead by the Supreme Court to remain as president.

An official in the president's office said the ruling Monday kept the general on track to quit the army by Nov. 30. "The president will not waste time in ... removing his uniform after a final court ruling," the official said, insisting on anonymity because he was not authorized to speak to journalists.

The Bush administration has put intense pressure on Musharraf to go further and lift emergency rule as swiftly as possible, fearing heightened discontent among moderates and secular groups will make it easier on militants.

Deputy Secretary of State John Negroponte said Sunday that Washington felt elections cannot be free and fair unless Musharraf frees opponents, lifts curbs on the media and lets political parties campaign freely.

But he also urged opposition parties to cool an "atmosphere of brinkmanship and political confrontation" and restart a reconciliation process that last month yielded a corruption amnesty that allowed Bhutto to return from exile.

At the Supreme Court, newly promoted Chief Justice Abdul Hameed Dogar dismissed three opposition petitions challenging Musharraf's presidential candidacy as unconstitutional because he also holds the post of army chief.

Dogar said two petitions had been "withdrawn" because opposition lawyers -- several of whom have been in jail since emergency rule was declared Nov. 3 -- were not in court. The third was pulled by a lawyer for Bhutto's party.

"We asked for [the case] to be postponed because we said there is no constitution," Bhutto told reporters in the southern city of Karachi after meeting with the U.S. ambassador, Anne Patterson.

Bhutto, a former prime minister who also favors ties with the U.S., said she had no plans to revive power-sharing negotiations with Musharraf. The talks broke down after police put her under house arrest to stop her from leading rallies against the general's suspension of the constitution.

"We are not going back to the former track," Bhutto said. "We are interested in a road map for democracy, but we do not have the confidence that Gen. Musharraf's regime could give us that road map."

However, she said her party had not decided whether to boycott the election and didn't repeat a vow made last week not to work with Musharraf after the vote.

Musharraf declared emergency powers Nov. 3, ordering the detention of thousands of opponents and shutting independent TV channels. He also removed Supreme Curt judges unwilling to support the order, days before they had been expected to rule on his eligibility for a new presidential term.

Despite deep personal mistrust, Musharraf and Bhutto continue to call for moderates to join forces against rising Islamic extremism -- a goal backed by Western countries with troops in Afghanistan who worry about al-Qaida havens in Pakistan's restless tribal region along the border.

In his first public comments since Negroponte's visit, Musharraf urged the opposition not to shun the parliamentary elections. But he also defended emergency rule.

"I took this decision in the best interest of Pakistan," Musharraf said late Sunday after inaugurating a bridge in Karachi, state media reported. "I cannot watch this country go down in front of me after so many achievements."

Rasul Baksh Rais, a political science professor at Lahore University of Management Sciences, said Monday's court ruling will give Musharraf leeway to lift emergency rule "very quickly" since he has now added the courts to his allies in the bureaucracy and military.

Relaxing the crackdown would then give Bhutto "some space to re-enter the negotiations which the United States and Benazir and Musharraf want to get back to," Rais said.

Musharraf, who seized power in a coup that ousted Nawaz Sharif as prime minister in 1999, has survived previous challenges thanks to the ability of Pakistan's military-led establishment to keep the country's weak opposition parties divided.

Sharif, who was exiled after coup, was sent back to Saudi Arabia last month when he tried to return home even though the previous Supreme Court ruled Musharraf's government could not keep him out.

The official Saudi Press Agency said Monday that Musharraf planned to visit Saudi Arabia today to discuss the situation in Pakistan with Saudi King Abdullah and make a personal pilgrimage to the holy city of Mecca.

Saudi officials would not say if the Pakistani leader would meet with Sharif.