Military leaders in Pakistan appear to be growing increasingly anxious about the standoff between Prime Minister Nawaz Sharif and two key opposition figures seeking his resignation, adding further volatility to the country’s political crisis.

On Wednesday, thousands of supporters of former cricket star Imran Khan and firebrand cleric Tahir ul-Qadri continued to camp out in front of the National Assembly and the Supreme Court in Islamabad’s “Red Zone” as they called for Sharif to step down.

Amid signs that the protests could turn more dangerous and spread to other parts of the country, a growing chorus of political and military leaders pushed for a negotiated settlement to resolve the deadlock. The crisis comes about 15 months after Sharif returned to power for his third term as premier.

Army chief Raheel Sharif — who is not related to Nawaz Sharif — told Shahbaz Sharif, the prime minister’s brother, in a face-to-face meeting in Rawalpindi, a city on the outskirts of Islamabad, that the crisis needed to be resolved “soon through meaningful dialogue,” according to military officials familiar with the discussion.

The officials spoke on the condition of anonymity to be candid about a private discussion. Shahbaz Sharif is the chief minister of Punjab province and a key adviser to the premier.

In a country that has experienced three military coups since its founding in 1947, including one in 1999 that ousted Sharif from his second term as prime minister, analysts widely interpreted the general’s remarks as a sign that the military could intervene if the protests do not subside in the coming days.

Sharif signaled through his advisers Wednesday that he is willing to meet with Khan, who leads the Movement for Justice party. But Khan, appearing Wednesday night before supporters camped on Islamabad’s Constitution Avenue, ruled out extensive negotiations with the government unless Sharif resigns. Khan alleges that last year’s national election, won by Sharif’s Pakistan Muslim League-N, was fraudulent.

“We are a political party, and we are ready for talks with the government, but before that, our first demand is the resignation of PM Nawaz,” Khan said. “He must go.”

Tensions increased Tuesday night when what had been separate demonstrations by supporters of Khan and Qadri merged and stormed past police defenses into the Red Zone, which includes major government offices, diplomatic compounds and two upscale hotels.

Wednesday morning, tensions climbed further when protesters with sticks began guarding the entrances of many of the government buildings, saying that the structures were under the control of demonstrators and that no one was allowed entry or exit.

Meanwhile, supporters of Sharif’s party reportedly attacked the home of a senior leader of Khan’s party in Multan in eastern Pakistan. The leader was in Islamabad at the time.

By Wednesday night, however, the protests had calmed and taken on a more festive tone, although many of the demonstrators continued to carry large sticks. With sanitation lacking, it was not clear how long authorities would allow tens of thousands of people to remain massed in the heart of the capital.

Tahirul Qadri, Canadian based Pakistani Muslim cleric, speaks to supporters during a mass governmennt protest in Islamabad. A growing chorus of leading voices is pressing the premier and his political foes to reach a negotiated settlement. (Bilawal Arbab/EPA)

There were also fears that the gathering could become a target for a terrorist attack as Pakistan’s military remains engaged in an operation against Islamist militants in the country’s northwest.

Nonetheless, the protesters appeared undeterred. Khan’s populist rhetoric about ending corruption has attracted many followers in their 20s and 30s. Qadri commands the loyalty of hundreds of thousands of blue-collar workers who support his call for moderation in Pakistan’s Islamic-based political system.

Protesters affiliated with both leaders are using the demonstration to vent concerns that Sharif has been slow to fight cronyism and to address chronic electricity and gas shortages and high unemployment.

“We will make a new Pakistan that will make you happy when you come here,” said Safdar Ali, 21, a Khan supporter who said he walked for two hours and took a four-hour bus ride from his home in Punjab to join the protest on Wednesday evening.

Yet, Khan and Qadri aside, no other major Pakistani political leader or stakeholder is pressing Sharif to resign.

Several prominent religious leaders, the U.S. government and the Muttahida Qaumi Movement, an influential liberal political party based in the port city of Karachi, have called for dialogue to resolve the standoff.

Ayaz Amir, a former member of the National Assembly and an Islamabad-based political analyst, said time may be running out to reach an agreement.

“It’s a deadlock now, and it seems it will persist, as we don’t see any serious effort to break it,” Amir said. “However, a deadlock can’t remain a deadlock forever, and a breakdown of the political system is feared.”