Prime Minister Nawaz Sharif was clinging to power Monday as protesters stepped up their assault on government buildings while the capital was gripped with fear and confusion about whether the country’s powerful military will step in to defuse the tension.

As the demonstrations calling for the prime minister’s resignation enter their third week, Sharif is trying to navigate Pakistan’s worst political crisis in more than a decade. With the violence increasing, what started as a routine demonstration has morphed into concerns that the government of a nuclear-armed country could collapse.

Former cricket star Imran Khan and Tahirul Qadri, a firebrand preacher and scholar, allege that Sharif was elected last year in fraudulent balloting and hasn’t done enough to fix the country’s ailing economy.

Khan and Qadri, who are considered moderates, have mobilized tens of thousands of followers onto the streets. Many are armed with sticks, clubs and slingshots.

Over the weekend, the demonstration took an ominous turn as three people were killed and 400 wounded when police used tear gas and rubber bullets to prevent protesters from reaching Sharif’s residence in Islamabad. On Monday, the protesters stormed the state television station and knocked it off the air for more than an hour.

Clashes between anti-government protesters in Pakistan and police spilled over from the weekend on Monday. Both police and those demonstrating were injured and taken to the hospital. (Reuters)

Army and paramilitary officers regained control of the building, which had been ransacked by demonstrators. But some protesters and police continued to beat each other with sticks in the heart of the capital, about a mile from the U.S. Embassy.

The protests spread to other major Pakistani cities over the weekend, and there is rampant speculation in Pakistan that military leaders could intervene and force Sharif to resign.

Sharif met with Army Chief Raheel Sharif on Monday afternoon, the third such face-to-face encounter between the two men since late last week. But Sharif, who is not related to the army chief, issued a statement late in the day saying he will not voluntarily resign.

“I will not resign under any pressure and I will not go on leave,” Sharif said. “There shall be no precedent in Pakistan that only a few people take as hostage the mandate of millions by resorting to force.”

Pakistan’s military issued a statement saying it was an “apolitical institution” with “unequivocal support for democracy.” The statement also “categorically rejected” suggestions that the military was secretly backing Khan and Qadri over Sharif.

But Sharif’s government appears increasingly vulnerable, which is alarming Western officials and many analysts. Last year, Sharif’s election marked the first successful transfer of power from one democratically elected government to another in Pakistan. It was a proud, historic moment in a country that has experienced three successful military coups since its founding in 1947.

Now, there is widespread concern that the country of 180 million people is entering a new period of uncertainty.

“There is complete confusion about what is happening,” said Hasan Askari, a Lahore-based political and military analyst. “On one hand it appears the state is collapsing, and on the other hand there appears to be a stalemate.”

Just two months ago, many Pakistanis were hopeful that the country’s challenges were ebbing after Sharif rallied most political parties behind his decision to authorize military action against Islamist extremists and terrorists in the northwestern part of the country.

Yet, Sharif has never been able to improve his relationship with Khan, the leader of the populist Movement for Justice party.

Last year, Sharif’s Pakistan Muslim League-N party routed Khan’s party in parliamentary elections, securing nearly three-fourths of the seats. Khan insists that hundreds of thousands of fraudulent ballots were cast in that election. In July, Qadri suddenly returned to Pakistan from Canada, where he also has citizenship, and said he was preparing a “people’s revolution” aimed at toppling Sharif because of his economic policies.

Khan and Qadri merged their grievances into one protest. Some analysts and government leaders have accused Pakistan’s military of secretly authorizing the demonstrations.

Over the past year, there have been signs that military leaders were annoyed over Sharif’s efforts to expand trade with neighboring India and keep the country’s former military ruler, Pervez Musharraf, on house arrest while he awaits trial on various charges related to his dictatorship.

Sharif’s history with the military has fueled the speculation about his current relationship with army leaders. In 1993, during his first term as premier, an army general forced Sharif to resign to resolve a dispute between him and then-President Ghulam Ishaq Khan. After Sharif regained power in 1997, he was ousted by Musharraf in a coup in 1999.

On Monday, a close adviser to Imran Khan held a news conference in which he also suggested that the military was behind the crisis.

Makhdoom Javed Hashmi of Khan’s Movement for Justice party said Khan escalated the protests over the weekend to satisfy military commanders.

Khan’s spokesmen have dismissed the allegations, accusing Hashmi of being disgruntled.

But there is concern that the turmoil may only intensify in the coming days. On Monday, Pakistan’s government filed terrorism charges against Khan and Qadri, accusing them of inciting their followers to attack government property.

Addressing his followers Monday between one of several clashes with police near Parliament, Khan responded to the charges by saying he plans to file murder charges against Sharif.

Khawaja Asif, the defense minister appointed by Sharif, told the newspaper Express Tribune that the country faced “destruction” should the demonstrators succeed in ousting the prime minister.

“Protesters want to break off any contact with the rest of the world,” Asif said.

Craig reported from Kabul.