Anjum Naveed, Associated Press
Aitzaz Ahsan, center with garland, a top leader of Pakistani lawyers seeking reforms, leads the "Long March" through Rawalpindi, Pakistan, on Friday.

ISLAMABAD, Pakistan — Tens of thousands of protesters swarmed into Pakistan's capital Friday for a raucous, sweat-soaked rally led by lawyers demanding the reinstatement of judges purged by President Pervez Musharraf.

The gathering, one of the largest ever in Islamabad, threatened to widen a rift within the governing coalition over the judges, but some analysts said it could prod the partners to find a way to restore the justices and hasten the exit of the unpopular U.S.-backed president.

Crowds milled about early today waiting for senior lawyers to address them from a stage mounted on shipping containers a few hundred yards from Pakistan's floodlit Parliament.

The biggest contingent was in a convoy of hundreds of vehicles that left the eastern city of Lahore on Thursday evening carrying flag-waving activists from anti-Musharraf parties and black-suited attorneys on the final leg of a grand procession that began from the corners of Pakistan early this week.

People amassed in towns along the Grand Trunk Road as the "Long March" crawled toward Islamabad on a hot, humid day. Protesters shouted, "Hang Musharraf!" and "Go, Musharraf, go!"

Police expected the throng in the capital to swell to between 40,000 and 50,000 people.

"All of Pakistan's problems are because one man was making all the decisions," said Omar Khan, a 39-year-old hospital orderly. "I am not interested in party politics. Just the restoration of the judiciary and rule of law."

The rally marked the return to political center-stage of lawyers whose protests undermined Musharraf's grip on power last year. They rubbed shoulders with supporters of hard-line Islamic parties that boycotted February elections that swept the former army strongman's supporters out of control in Parliament.

But worryingly for the new government led by the party of slain former Prime Minister Benazir Bhutto, the protest was also joined by its key coalition partner — the party of former Premier Nawaz Sharif, who was ousted in Musharraf's 1999 coup and is now pressing for the judges return.

Bhutto's widower and political successor, Asif Ali Zardari, has stalled on taking that step despite earlier promising to do so, possibly because he wants to avoid a showdown with Musharraf.

The show of support for the restoration of judges will buffet the government as it grapples with economic problems as well as Western pressure to tackle Islamic militant groups. The rally drew many ordinary citizens who support the cause of establishing the kind of independent judiciary that has eluded Pakistan during a tumultuous 60-year history.

Authorities declared the government district and a compound housing foreign embassies off-limits to the protesters. Last week, a suicide car bomb killed six people outside the Danish Embassy. Coils of barbed wire and hundreds of police were deployed to channel visitors through security checks. Helicopters circled overhead.

As he rode atop a truck into the city, lawyer leader Aitzaz Ahsan said the scale of the rally should "open the rulers' eyes" about the strength of support for an independent judiciary.

"There will be no closure of this issue until the fearless, independent judges are reinstated," he said.

Musharraf imposed emergency rule and purged the Supreme Court in November to halt legal challenges to his re-election as president by the previous parliament. He accused then-Chief Justice Iftikhar Mohammed Chaudhry of conspiring against his plan to guide Pakistan back to democracy.

The clampdown contributed to the defeat of Musharraf's allies in the elections. But the victors have failed to agree on how to honor their promise of restoring the judges, sowing doubts about the durability of their alliance and raising the prospect of fresh political turmoil.

Political analyst Rashed Rahman said the protests could force the government to restore the judges.

"Islamabad, the federal capital, is to all intents and purposes paralyzed by these events, and if that's the case, the pressure will be immense," he said.

Sharif has pulled his ministers from the Cabinet over the judges' issue, and on Friday he hailed the protest. "It shows that the nation has risen up, and, God willing, these judges will definitely be restored and no one can stop it," he said.

Musharraf, a stalwart U.S. ally, has taken a back seat since the new civilian government came to power, ending eight years of military rule, but he has resisted calls for him to resign.

Mehdi Hasan, a journalism professor, predicted that Musharraf would hold on to his post, at least for now.

"No Pakistani military dictator has left the political scene unless he is forced to by the army leadership. He has still got their backing," Hasan said.