Pakistan's supreme court is set to decide on a slew of petitions challenging the general's authority.
A nine-member panel of judges took up six petitions on Monday urging the court to disqualify him as a candidate in the next presidential elections.
In one petition, Jamaat-e-Islami, Pakistan's largest Islamic group, said a 2004 parliamentary act that enabled Musharraf to become president while he still held the army chief’s post was against the constitution.
"Musharraf is shouting slogans of war against terror in order to win US support"
Ali Abu Hamza, Chichawatni, Pakistan
Send us your views
Musharraf's "candidature for the election of the office of the president of Pakistan ... for the next term is void, malafide, unconstitutional, without lawful authority and of no legal effect," said the petition.
It was unclear when the court would make a ruling.
The announcement on Musharraf quitting his army job was read out in Islamabad during the court hearing into the opposition petitions.
"If elected for a second term as president, Musharraf shall relinquish charge of (the post of) chief of army staff soon after elections and before taking the oath of president for the second term," Sharfuddin Pirzada, the government lawyer said.
The move was confirmed by Tariq Azeem, the deputy information minister.
"The time has come for Musharraf to shed his military uniform," he told AFP. "He will have to hang up his uniform before starting his next term."
The party of Benazir Bhutto, a former prime minister, dismissed Musharraf's decision as both unconstitutional and undemocratic.
In a statement, the Pakistan People's Party (PPP) said: "The PPP has made it very clear at all points that it cannot accept a uniformed president.
|Bhutto is planning to return from exile to |
contest parliamentary elections [AFP]
The party said it could resign from parliament if the goverment does not take more steps for national reconciliation, although it said its strategy was not yet finalised.
Bhutto has been in talks with Musharraf for months over a potential power-sharing deal, a key condition of which is that he should hang up his army uniform..
The former prime minister is also planning her return from exile on October 18 to contest parliamentary elections that must be held by mid-January.
Musharraf's authority slipped when he tried to remove Iftikhar Mohammed Chaudhry, the supreme court's chief judge, this March. It sparked a pro-democracy protest movement and the court later reinstated Chaudhry.
In another legal challenge, Nawaz Sharif's party has petitioned the supreme court to begin contempt proceedings against the government for deporting the former prime minister to Saudi Arabia last Monday hours after he arrived back in Pakistan after seven years in exile.
On August 23, the court had ruled that Sharif had the right to return. A hearing on that petition has not yet been fixed.
Musharraf, seized power in a bloodless coup in 1999, by ousting Sharif.