ISLAMABAD, Pakistan - President Gen. Pervez Musharraf could quit as chief of the army and take oath as a civilian president by Saturday, a senior official said.

Meeting another key demand of his U.S. sponsors and domestic opponents, another official said authorities had freed almost all of the thousands of people rounded up under emergency law.

The Supreme Court is expected to clear the last legal obstacles to Musharraf's continued rule as president on Thursday. The Election Commission can then confirm his victory in a disputed October presidential election.

Attorney General Malik Mohammed Qayyum told The Associated Press on Wednesday that Musharraf would quickly quit his army post and be sworn in for a new five-year term.

"It may happen on Saturday," Qayyum said. "I know the president, and he will honor his commitment."

The general has been under heavy political pressure since he suspended the constitution Nov. 3 and cracked down on dissenters who had questioned his right to stay in power.

The United States has said crucial Jan. 8 elections will be seriously compromised if the state of emergency is not lifted. Washington hopes that balloting will usher in a moderate government committed to fighting Islamic extremism.

At home, Musharraf risks seeing his two main rivals -- former prime ministers Benazir Bhutto and Nawaz Sharif -- join forces to oust him.

But after purging the Supreme Court of dissenting judges, Musharraf has reined back some of the most draconian elements of what many legal experts are describing as martial law.

In an interview with the AP, Sharif said Wednesday that Bhutto was resisting his call for an election boycott. Speaking from exile in Saudi Arabia, Sharif also forecast that Saudi authorities would approve his plan to leave the kingdom and return to Pakistan.

Meanwhile, Law Minister Afzal Hayder said the government had freed 5,634 political activists and anti-government lawyers. "Now 623 people are in the government's custody" and authorities have been ordered to release them, Hayder said on state television.

Those freed included Imran Khan, a former cricketer and playboy who is now a firebrand opposition leader.

Mohammed Bakhsh, a senior official at the Dera Ghazi Khan jail where Khan had been held -- told AP that friends had picked Khan up outside the lockup and driven him away.

Seeking to stave off diplomatic isolation, Pakistan on Wednesday asked a key international forum comprising Britain and its former colonies to delay a decision on whether to suspend it.

In a phone call with his British counterpart on Tuesday, caretaker Prime Minister Mohammedmian Soomro asked the Commonwealth for a "short postponement," Foreign Ministry spokesman Mohammed Sadiq said.

Soomro "expressed concern that any precipitate decision by (the Commonwealth) on Pakistan's participation in the Commonwealth would be unfortunate" and urged them to send a delegation to Pakistan to find out more about the situation, Sadiq said.

Foreign ministers from the 53-nation organization meeting in Kampala, Uganda, were expected to take up the issue of Pakistan on Thursday.

A suspension would be an international embarrassment for Pakistan, which was last kicked out of the organization in 1999, following Musharraf's coup. It took them five years to be reinstated.