Pakistani supporters of the Tehreek-i-Labaik Yah Rasool Allah

 Pakistan's law minister resigned Monday after the embattled government bowed to demands from a small Islamist group, striking a deal with the help of the military to end a weeks-long anti-blasphemy protest.

At the site of the sit-in which had blocked a major road into Islamabad, demonstrators were slowly packing up tents and walking to bus stops as shops and markets reopened for the first time since the protest began.

Khadim Hussain Rizvi and his supporters from the once-obscure Tehreek-i-Labaik Ya Rasool Allah Pakistan (TLY) group had paralysed the capital since November 6 with just 2,000 demonstrators, enraging millions of commuters and the judiciary who blasted the government for hesitating to act against them.

Analysts said the capitulation to him and his supporters was an unsettling sign of the influence even marginal religious groups wield in Pakistan and an embarrassment for the government before elections due in 2018.

The demonstrators demanded the resignation of law minister Zahid Hamid over a hastily-abandoned amendment to the wording of an oath which election candidates must swear.

The change was small and quickly reversed, but the TLY linked it to blasphemy, a hugely charged issue in the conservative Muslim country.

The ruling Pakistan Muslim League-Nawaz (PML-N) remained silent Monday, with no official comment on the report by state media that Hamid had resigned.

But a triumphant Rizvi called off the sit-in in a statement to supporters, saying the army had guaranteed their demands would be met and thanking the powerful military chief for "playing his role".

"Respected army chief General Qamar Javed Bajwa had sent his representatives and we signed the agreement with them," he claimed.

The declaration, as well as a widely-circulated text of the agreement signed by Rizvi, the interior minister and Major General Faiz Hameed, among others, spurred the Islamabad High Court to demand the government give a full accounting of the army's role in the deal.

The government had called on the military to intervene to restore law after police and paramilitaries bungled an attempt on Saturday to dislodge the protesters.

The move sparked clashes that left at least seven people dead and ignited protests across the nuclear-armed nation of 207 million people.

But the army had still not publicly responded to the government's call by Monday, fuelling rampant speculation about what was going on behind the scenes.

Hameed's signature on the text agreement was "most alarming" and Rizvi's gratitude to army chief Bajwa was "strange", Judge Shaukat Aziz Siddiqui said in an order that was made public as the official silence continued Monday.

Analysts said the government had been so undermined it had been left with no option but to seek the help of the army, widely seen as the most powerful institution in Pakistan.

"They wanted to put the army against the protesters, and when the military refused... the government was left with no way out," analyst Rasul Bukhsh Rais told AFP.

"The government's capacity is eroded," he said. "Nobody was willing to listen to them."

- 'Major embarrassment' -

"It was our goal to be martyred for the honour of the Prophet," one protester, 19-year-old Mehboob Ahmed, told AFP at the protest site in Islamabad.

"We fought fearlessly but I feel sad and regret that I could not get martyrdom."

Authorities had initially hesitated to act over the sit-in.

Pakistan's civilian government has long pulled its punches in such situations, fearing that a crackdown on a religious group would incite blowback, as it has in the past.

Minister Hamid's ousting is the latest in a series of heavy blows to the ruling party.

In July Nawaz Sharif was deposed as prime minister by the courts over graft allegations, while finance minister Ishaq Dar -- also accused of corruption -- has taken indefinite medical leave.

Observers had previously warned that capitulation would set a dangerous precedent.

"Politically, this is a major embarrassment for the PML-N," analyst Hasan Askari told AFP, adding that it would undermine their credibility and predicting more defections.

He also warned it had strengthened the position of hardline groups like TLY.

TLY comes from the Barelvi sect of Islam that has strong ties to Sufism, a mystical branch of the religion seen as moderate. It emphasises personal devotion to the Prophet Mohammed.

However the execution in 2016 of Barelvi follower Mumtaz Qadri -- who assassinated liberal Punjab governor Salman Taseer over his stance on the blasphemy laws -- appears to have galvanised Rizvi and his followers.

Askari warned that the decision by TLY and other Islamist parties to contest the upcoming elections could further weaken the PML-N. The party has previously benefited from the right-wing religious vote.

source: AFP