LAHORE, Pakistan (CNN ) -- Pakistan's Supreme Court ruled Friday afternoon the country's leader, Gen. Pervez Musharraf, is eligible to run in next week's elections for another five-year presidential term.
President Musharraf of Pakistan has pledged to stand down as chief of the military if he is re-elected
In a nine to six vote, the high court dismissed petitions challenging Musharraf's re-election bid. Political opponents had argued the constitution forbids a military officer from running for president within two years of holding rank. In addition, they said, the constitution calls for an elected official to step down and wait a year before seeking a third term.
The court's vote was disclosed but the decision on which it was based was not immediately released.
Displeased with the decision, opposition lawyers chanted anti-government slogans while blocking that main road leading from the supreme court.
A lawyer for Pakistan's opposition, Akram Sheikh, told CNN he and others would appeal against the ruling Monday.
Opposition party members were also displeased.
In an attempt to hinder Musharraf's run for the presidency, opposition party leader Javaid Hashmi told CNN members of the opposition serving in the parliament would resign October 2 -- a day ahead of elections -- from national and provincial assemblies.
On Friday the high court was also expected to rule on whether Musharraf must resign as the military's commander, as the opposition has demanded.
Musharraf last week pledged to take off his general's uniform and restore civilian rule before he takes the oath of office again, if lawmakers approve a fresh mandate on October 6.
The run-up to the election has not been short of controversy. But, after a hearing on the opposition petition last week, the secretary general of Musharraf's Pakistan Muslim League party, Mushahid Hussein, told reporters if the president resigns as army head before taking office it should end the controversy.
Pakistan's national Parliament and provincial assemblies choose the president. The current Pakistan parliament is expected to elect a president before October 15, with the new five-year term starting on November 15.
Musharraf has seen his power erode since a failed effort to fire the Supreme Court's chief justice earlier this year. His administration is also struggling to contain a surge in Islamic militancy.
In an effort to shore up support and possibly strike a power-sharing deal, Musharraf has held talks with exiled opposition leader Benazir Bhutto.
Bhutto has said negotiations between her opposition party and Musharraf involve appointing a caretaker government, holding fair elections and returning to parliament powers that were removed after the 1999 coup in which Musharraf seized power.
However, on Thursday, Bhutto said she has grown increasingly pessimistic about reaching a power-sharing deal.
She told CNN that she and Musharraf have "had an opportunity to meet, we've had a good rapport, a good exchange of ideas, but there are people around him who don't want this understanding, who don't want him to make the political concessions that are necessary to facilitate the path towards democracy."
Bhutto plans to return in October from self-exile to challenge Musharraf. She has threatened to withdraw her lawmakers from parliament if Musharraf does not compromise, for instance by lifting a ban on her serving a third term as prime minister.
The constitution's two-term limit for prime ministers would have to be amended to allow Bhutto to serve a third term.
Asked if she had met secretly with Musharraf, Bhutto said: "Well, we were supposed to keep it secret, but it's kind of an open secret now."
"I had asked him to take some steps for fair elections. These remain unimplemented," she said. "So, now I worry. I worry that time is running out."
In July, Pakistan's minister for railways said Musharraf and Bhutto met in the Gulf emirate of Abu Dhabi.
Bhutto also said she had asked Musharraf to provide "me with the security that I'm entitled to as a former prime minister" when she returns from exile October 18.
One of Bhutto's rivals, former Prime Minister Nawaz Sharif, was swiftly sent to Saudi Arabia when he tried to return to Pakistan two weeks ago. Bhutto said she did not believe she would be deported, though she has received no assurances from Musharraf. E-mail to a friend
CNN's Syed Mohsin Naqvi contributed to this report