Supporters of cricketer-turned-politician Imran Khan shout slogans against Prime Minister Nawaz Sharif during a protest Tuesday in Islamabad, Pakistan. (Muhammed Muheisen/Associated Press)

Tens of thousands of anti-government protesters marched on Pakistan’s Parliament on Tuesday night, even as Prime Minister Nawaz Sharif mobilized the military to help secure the heart of the capital.

On a day when the country’s political crisis escalated sharply, demonstrators demanding Sharif’s resignation began their march toward heavily fortified areas of Islamabad shortly after sunrise. Although few expect Sharif to step down, the protests are fomenting further instability in a region struggling with an election stalemate in Afghanistan and the continued threat from Islamist militancy.

The march follows a multi-day sit-in led by Imran Khan, leader of the Movement for Justice party, and firebrand cleric Muhammad Tahir ul-Qadri. Khan alleges that last year’s elections, in which Sharif’s Pakistan Muslim League-N won the majority of seats in Parliament, were rife with fraud. Qadri accuses Sharif of being too slow in implementing political and economic reforms.

“Listen, Nawaz Sharif, I am coming, and you have to go,” Khan declared before ordering his supporters to test police and military lines near Parliament. “I am coming for your resignation, and I will not return without that.”

For days, Khan and Qadri had warned that they were preparing to lead their followers into the capital’s “Red Zone,” which includes the National Assembly, the Supreme Court, diplomatic compounds and Sharif’s official residence.

In response, the prime minister requested Tuesday that the military take charge of securing the area. It was a surprising move by Sharif, who has had an uncomfortable history with the army, including his ouster in a military coup in 1999 when he last served as prime minister.

Undeterred by soldiers deploying on Islamabad’s Constitution Avenue, what had been separate gatherings of Khan and Qadri followers merged about 8 p.m. to march toward the Red Zone.

As the protesters chanted “Sharif must go,” a crane at the head of the march dismantled a barrier of shipping containers that the government had erected on city streets earlier in the week to keep protesters away from sensitive areas.

A senior police official, speaking on the condition of anonymity because he was not authorized to talk to the media, said officers were under orders to allow the demonstration to proceed.

Many of the protesters were carrying clubs, slingshots and shields and wearing gas masks in preparation for possible violence. But the demonstration appeared relatively peaceful, although one protester was seen being carried away after he said he was shot with a rubber bullet. The newspaper Dawn also published a photograph of a police officer with a bloody nose.

“Our mission is to get rid of these corrupt rulers and free the people from this corrupt government,” said Ajab Khan Miankhel, a 34-year-old construction worker who traveled from the northwestern city of Quetta to join the rally.

In a statement shortly after the protesters reached Parliament, the army warned them to keep out of government buildings.

“Buildings in the red zone are symbols of the state, and being protected by the army, therefore, the sanctity of these national symbols must be respected,” the statement read. “The situation requires patience [and] wisdom . . . from all stakeholders to resolve prevailing impasse through meaningful dialogue.”

By 2 a.m. Wednesday, several thousand protesters had fallen asleep on Constitution Avenue, preparing for what is likely to become an extended stay.

But Imran Khan arrived about a half-hour later, riding on the top of a truck and energizing a crowd that appeared to be growing despite the late hour.

Several dozen soldiers could be seen inside the gates of Parliament and the Supreme Court, but they did not have an active presence on city streets.

Many political leaders and analysts accuse Khan, a former cricket star whose party finished third in the elections, of being irresponsible in pushing Pakistan to the brink of crisis.

On Monday night, members of Khan’s party, also known as Pakistan Tehreek-e-Insaf (PTI), announced that they were resigning from the National Assembly, where they hold 34 of 342 seats. He also called on his followers to stop paying taxes until Sharif resigns.

“No sane person at home or abroad endorses his extreme demand” for Sharif’s resignation, Imtiaz Gul, executive director of the Islamabad-based Center for Research and Security Studies, said Tuesday on Twitter.

Zahid Khan, a senator from the Awami National Party, said the PTI leader is harming the country’s fragile democracy.

Imran Khan cannot bring down the government with a few thousand people’s protest on roads,” he said. “This is undemocratic and rather childish.”

One of the PTI lawmakers who gave up her seat, Shireen Mazari, said the protests will continue until Sharif resigns and “nothing short of that.”

“We are trying to exert our democratic norm and demanding the resignation of a prime minister who doesn’t have the support of the people,” Mazari said.

But even though many Pakistanis complain of electricity shortages and high unemployment, there does not appear to be a groundswell of opposition to Sharif. Most other major political parties say it is premature to call for Sharif to step down.

The prime minister’s decision to enlist the army to secure the Red Zone, however, has elevated the stakes in the intensifying political drama.

Interior Minister Chaudhry Nisar Ali Khan attributed the decision to the presence of embassies and upscale hotels in the high-security area.

“It is our international obligation and constitutional responsibility to protect the Red Zone,” he told reporters.

Yet the interior minister said the move also could be interpreted as a sign that the powerful military was standing behind the premier.

“I can tell you with authority that the army is not behind these protests,” he said.

But the sight of troops patrolling key government buildings is likely to be controversial in a country that has experienced three military coups since its founding in 1947. In 1999, then-army chief Pervez Musharraf led the coup that ousted Sharif.

Since regaining power, however, Sharif has had to increasingly lean on the army for support. Last year, troops were called in to Rawalpindi — a city on the outskirts of Islamabad — to help curb a deadly clash between Sunnis and Shiites.

In June, after more than two dozen people were killed when the Taliban attacked the international airport in the port city of Karachi, Sharif authorized the army’s ongoing operation against Islamist militants in the country’s northwest. The army also was tasked with overseeing airport security nationwide.

Zahid Hussain, an Islamabad-based defense and political analyst, said Sharif’s decision to deploy the army in Islamabad may only add to his political woes.

“The civil administration has collapsed,” Hussain said. “The government has called in the army, which is proof of its failure. This is what PTI and Qadri wanted.”