ISLAMABAD, Pakistan (CNN ) -- Pakistan's election commission Saturday accepted President Gen. Pervez Musharraf's nomination to run in next week's presidential elections as riots between police and anti-Musharraf protesters erupted outside the commission's building in Islamabad.
Pakistan's Supreme Court cleared the way for the commission's action Friday by rejecting petitions that attempted to prevent Musharraf from seeking re-election, effectively allowing him to run in next week's elections for another five-year term.
Displeased with the decision, scores of journalists and anti-Musharraf lawyers led demonstrations Saturday that eventually turned violent.
Wielding riot batons and tear gas, police cracked down on crowds massed outside the Supreme Court and the nearby election commission office.
Video footage showed a crush of people pushing against the shields of riot police as smoke from tear gas canisters clouded the background. Watch police use batons and tear gas on protesters »
Political opponents have been arguing 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.
Speaking from within the election commission office, CNN's Syed Mohsin Naqvi reported the activity outside grew to such a level that Pakistan's Prime Minister Shaukat Aziz was unable to exit the building.
Police fired tear gas into the crowd and at least three journalists were taken by ambulance to the hospital for injuries, sources inside Pakistan's information ministry told CNN.
Sources added police have arrested at least two journalists, using force on several others.
Meanwhile, the government temporarily shut down Pakistani TV channels GEO and ARY in Islamabad for broadcasting the protests.
Protests outside election commission offices in Lahore and Karachi also turned violent, with police firing tear gas at demonstrators.
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.
Although eligible to run for another term, it was not immediately known whether Musharraf would face restrictions on running as military commander, which the opposition is against.
Last week Musharraf 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 Oct. 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