Lawmakers in Pakistan rallied around embattled Prime Minister Nawaz Sharif on Tuesday, and his government said it was ready to confront the “terrorists” who are trying to oust him from power.

During a day-long session of Parliament, legislators from across Pakistan’s political spectrum condemned what they view as a growing threat to the country’s fragile democracy. They accused former cricket star Imran Khan and firebrand Muslim preacher Tahirul Qadri of conspiring to engineer an unconstitutional power grab.

Thousands of supporters of the two men have demonstrated in Islamabad for the past three weeks, demanding Sharif’s resignation. The protests turned violent over the weekend, raising concerns that Sharif’s government could fall, ushering in a new era of military rule.

“Today, we parliamentarians are united in our vow to defend this Parliament,” said Mahmood Khan Achakzai, president of the Pakhtunkhwa Milli Awami Party. “We all agree and resolve that the hand that is stretched to harm the democracy will be stopped.”

Sharif, who began his third term as premier 15 months ago, attended the parliamentary session but did not speak. Instead, Interior Minister Chaudhry Nisar Khan told lawmakers that the demonstrators were committing “treason against the state.”

Thousands of protesters who've been demanding the resignation of Pakistani Prime Minister Nawaz Sharif camped out in the center of Islamabad on Tuesday. The protesters accuse the government of corruption. (Reuters)

“These are not protesters or revolutionaries, but these people are intruders and terrorists,” the interior minister said. “It shall be clear to all that the whole nation is behind this Parliament against this army of intruders, who call themselves protesters. God willing, we will come out of this crisis unharmed and unscathed.”

The protesters seem to be an atypical group to be identified as “terrorists.” Many appear to be 20- and 30-somethings who seem tolerant of Western values and say they resent extremism.

They have been drawn to the protest in support of Khan’s populist message of fighting corruption and Qadri’s sermons about the wealth gap between Pakistan’s working class and its wealthy elite. Khan and Qadri also accuse Sharif, who served two terms as prime minister in the 1990s, of winning last year’s election through fraud.

“If we get him out, there will be a revolution in Pakistan, and all the politicians will have to cower,” said Omar Nazir, a 22-year-old college student from Peshawar. “We are trying to change Pakistan, and I want that change to mean something.”

But the protests turned violent over the weekend as demonstrators tried to storm Sharif’s residence, the Parliament building and at least two television stations. Three people have been killed and more than 400 injured as police and demonstrators clashed, at times beating each other with sticks.

On Tuesday, Islamabad was relatively calm, but the demonstrators still control Constitution Avenue, the symbolic heart of the capital, as well as the grounds of the Parliament and the prime minister’s secretariat.

Thousands of police officers were huddled several blocks away, effectively allowing the demonstrators to set up their own checkpoints and make their own rules in their camping sites in the shadow of Pakistan’s most prominent government buildings.

Sharif, however, appears to be consolidating his support as much of the country’s elected leadership rallies behind him. Several lawmakers called for immediate action to clear the protesters from the capital, saying the demonstration is hurting the country’s image and international ties.

“There has been a hatching of a conspiracy against democracy, but this time all the major political parties understand it,” said Fazlur Rahman, a top Pakistani cleric and leader of the Jamiat Ulema-e-Islam party.

He questioned why Pakistan’s military has taken action against Islamist extremists in the Swat Valley and North Waziristan but s is hesitant to engage the protesters.

“Why are we reluctant to use limited force against these protesters, who have not only breached the constitution but have physically attacked Pakistan state institutions including this august house?” he asked.

For weeks, many Pakistani analysts have speculated that the country’s powerful military may be secretly supporting Qadri’s and Khan’s efforts. The military, which has launched three successful coups since Pakistan was founded in 1947, has repeatedly stressed that there is no back-door alliance between it and Khan or Qadri.

Speaking to his followers Tuesday evening, Qadri also strongly denied that the military was supporting the demonstrations.

“These allegations are in fact a conspiracy against our peaceful and democratic struggle,” Qadri said.

But Pakistan’s influential Dawn newspaper — established in the 1940s by the founder of Pakistan, Muhammad Ali Jinnah — published a scathing editorial Tuesday in which it concluded that the army was “hardly being neutral.”

It noted that the army had not supported the police in trying to prevent the protesters from storming government buildings.

“On Saturday, as violent thugs attacked the Parliament, it was surely the army’s duty to repel them,” Dawn wrote. “But the soldiers stationed there did nothing, and the army leadership the next day warned the government instead of the protesters.”

Shahid Latif, a retired Pakistani air force marshal and military analyst, said he seriously doubts that the military would ever use force against the protesters. He’s less certain, however, that Sharif will ultimately remain in office should the crisis worsen.

“The army would stand with the people,” Latif said. “The army could tell the government: You have failed to resolve this serious crisis, so hand over the country to us, and we will resolve it as it can’t be settled as long as you are present.”

Haq Nawaz Khan contributed to this report.