Pakistan’s powerful military has once again proved exactly who is running the country.

The army yesterday brokered a deal between the civilian government and Islamist protesters who had paralysed life in the Pakistani capital by blocking a main road connecting the federal capital to the garrison city of Rawalpindi for almost 22 days. Islamists lifted the blockade after the government agreed to force federal law minister Zahid Hamid to resign. The resignation paved the way for the two sides to reach an agreement brokered by Pakistan’s powerful army chief.

The agreement clearly stated that all sides were grateful to army chief General Qamar Javed Bajwa and his team for their “special efforts” in negotiating the deal. The leader of the Islamist group even took to the microphone to announce his gratitude.

Is Trump driving Pakistan deeper into China’s orbit?

“The army deserves thanks for resolving the crisis. The stage was set, the army could have just taken over, they didn’t,” said defence and security expert Sohail Iqbal Bhatti.

The lockdown underscored the fragility of Pakistan’s politics, in which an unknown Islamist party is able to bring Pakistan’s civilian government to its knees.

Clashes erupted last week when riot police tried to disperse the Islamabad sit-in and descended on the protesters with tear gas and batons, leaving six dead and dozens injured. The crackdown triggered countrywide protests, forcing the government to shut down private TV channels and social media. On the advice of Pakistan’s army chief, the government has now restored those channels and social networking sites.

First Trump, then China: as Pakistan loses support, it should lose the pretence on cross-border terror, too

The protesters had accused Federal Law Minister Zahid Hamid of committing blasphemy by changing the wording of an oath taken by parliamentarians in Pakistan. The protesters perceived the tweak as representing a softening of the state’s position against members of the Ahmadi sect, who are not permitted to identify themselves as Muslims in Pakistan.

The government said it was a “clerical mistake” and the oath was hastily amended back to its original wording. The protesters still laid siege to the capital for weeks, demanding that Hamid resign from the cabinet.

The past couple of weeks, Pakistan has been abuzz with rumours that the army might have planned and backed the protest to engineer a coup. The civilian government had dispatched emissaries to consult the army chief, said a source. The envoy was reportedly assured by the military that there would be no coup.

Trump beware: Pakistan’s luck playing China card is turning

This was the second time during the tenure of this government that the army has had to intervene to enforce the government’s writ. In August 2014, the government had requested the then army chief General (now retired) Raheel Sharif to mediate a deal between the government and cricketer Imran Khan’s Pakistan Tehreek Insaf party to end a months-long sit in.

As the country heads back to general elections next year, a fresh validation of its continuing grip on power is not lost on Pakistanis. Last year, banners requesting the then military chief Gen Shareef to take over the country popped up all over Islamabad.