ISLAMABAD, Pakistan - Thousands of lawyers boycotted courts across Pakistan on Thursday while police blocked former Prime Minister Nawaz Sharif and his supporters from marching to the heavily guarded home of the deposed Supreme Court chief justice.

Riot police nearly outnumbered the hundreds of protesters in Islamabad, and blocked the route to the official residence of Iftikhar Mohammed Chaudhry with concrete blocks, steel and barbed wire.

Chaudhry has been under house arrest since Nov. 3, when President Pervez Musharraf declared a state of emergency and dismissed most of the Supreme Court justices just before they were to rule on the validity of his October re-election by a parliament controlled by his supporters.

Musharraf has since stacked the court with loyalists, who promptly dismissed all complaints against the former general's election.

Also, attorneys in various cities boycotted court proceedings, hoisted black flags and staged rallies to demand an end to emergency rule, reinstatement of the dismissed judges, and restoration of the constitution, said Syed Mohammed Tayyab, secretary general of Islamabad Bar Association.

Lawyers in Islamabad, Peshawar, Quetta, Lahore and Karachi confirmed that they refused to appear in court and hundreds of them staged protest gatherings, mostly at court premises. Several lawyers and police were injured in scuffles at a rally in the central city of Multan, witnesses said.

In Islamabad, Sharif led the marchers -- who included members of his party, lawyers in black suits and a number of women carrying flowers, chanting "Finish with your show; go, Musharraf, go."

He then briefly addressed them before they dispersed peacefully, defusing a potential showdown with a government that has shown no tolerance for public dissent.

Sharif, who was ousted by Musharraf in a 1999 and returned from exile 10 days ago, vowed to continue pursuing the reinstatement of Chaudhry and other judges.

"I want to tell the nation that past dictators were also used to ousting prime ministers, arresting them from their houses and hanging even one of them," he said. "Now a dictator has attacked the judiciary, and if the nation today ignores these actions of a dictator, history will not forgive it."

Since returning from exile in Saudi Arabia 10 days ago, Sharif -- ousted by Musharraf in a 1999 military coup -- has become the president's most vehement critic.

Another former prime minister and key opposition leader, Benazir Bhutto, said Thursday that the issue of reinstating the justices should be left to the future parliament.

Bhutto indicated that her party may call for anti-government protests if parliamentary elections on Jan. 8 are rigged.

"Either the elections will be fair and the people will get their own parliament, or if elections are not fair, then the movement will start," Bhutto told reporters.

She planned to fly to Dubai on Friday after document problems prevented her from boarding a flight to Dubai Thursday. She was stopped at Islamabad's airport when she mistakenly presented an old, expired passport during a standard document check.

Representatives of Sharif's Pakistan Muslim League-N group and Bhutto's Pakistan Peoples Party were reported to be nearing agreement Thursday on a joint set of conditions for their participation in the elections.

The parties are expected to demand restoration of an independent judiciary and the constitution and creation of a neutral caretaker government and independent election commission, and will likely set a deadline for government compliance.

"We're optimistic that we'll reach agreement because everyone wants to pull the country out of this crisis and prevent Musharraf from rigging the elections," said Ahsan Iqbal, spokesman for the Pakistan Muslim League-N. "Despite our differences in the past, we are legitimate democratic parties while Musharraf is an illegitimate military dictator."

A boycott would undercut efforts that Musharraf -- a key ally in the U.S. war on terror -- says he is making to engineer a transition to democracy for Pakistan after eight years of military rule. It also would represent a major setback for the United States, which has promoted the former four-star general as a moderate leader able to stand up to Islamic extremism.

In Lahore, about 700 lawyers and activists rallied to demand the reinstatement of Chaudhry and other judges. The protesters, who marched through the city chanting anti-government slogans, later dispersed peacefully.

Musharraf has freed most of the thousands of opposition activists and members of civil society who were arrested in the immediate aftermath of Nov. 3. He also has promised to lift the emergency Dec. 16, about three weeks before the elections.