The resignation of Pakistan's federal law minister and signing of an agreement to end a weeks-long sit-in outside the capital Islamabad has been termed a "surrender" and a "dangerous trend for democracy and the state".

Thousands of supporters of a religious party launched a sit-in outside Islamabad earlier this month, demanding the resignation of minister Zahid Hamid for a change in the country's electoral law that they termed a softening of the state's position against the Ahmadi community.

Ahmadis are a sect that consider themselves Muslim but whose faith is rejected by the Pakistani state.

On Monday, Pakistan's Interior Minister Ahsan Iqbal from the ruling PML-N party, said the agreement would see the demonstrators in Islamabad, and other cities including Lahore and Karachi, disperse.

The agreement would also see all protesters who were arrested during the sit-in, which began on November 8, released within three days.

Videos circulating on social media showed a high-ranking official of Pakistan Rangers hand out 1,000 rupees ($9.5) in envelopes to members of the religious party as compensation.

Rangers Punjab DG Maj-Gen Azhar Naveed showing unconditional support with the problem who held country hostage for weeks. pic.twitter.com/EA97mDtKLP — Nazrana Ghaffar (@NazranaYusufzai) November 27, 2017

"We never saw such a trend before," Chairman of the Senate Raza Rabbani, who belongs to the opposition Pakistan People's Party, was quoted as saying.

"The trend which we are witnessing today is not only dangerous for the political class of a teething democracy, it is also quite dangerous for the state."

On Tuesday, English daily Dawn, in an editorial titled Capitulation, called the agreement "a surrender so abject that the mind is numb and the heart sinks".

{articleGUID}

"The deal negotiated between the state, both civilian and military facets of it, and the Faizabad protesters is a devastating blow to the legitimacy and moral standing of the government and all state institutions," the editorial read.

At least five people were killed and more than 217 - mostly members of the security forces - were wounded in those clashes.

The signed agreement ended by "crediting army chief Gen Qamar Javed Bajwa and his representative team for their special efforts that led to the agreement being signed", according to Dawn.

The involvement of the army and the signature of Inter-Services Intelligence officer Major-General Faiz Hameed on the agreement were also a matter of concern.

The criticism comes while the Pakistan government has been on the defensive since the courts disqualified its leader, Nawaz Sharif, from continuing as prime minister in July.

Sharif has repeatedly suggested that the military establishment is the force behind his removal, an accusation denied by the military.

Minister of State for Interior Affairs Talal Chaudhry said while the agreement was acceptable in order to end the protests, its long-term term impact would "not be good."

"You have to surrender sometimes, and on others, you need to have a dialogue with the party," Chaudhry was quoted as saying by BBC Urdu.

"In such cases presence of uniformed persons can trigger speculations on the impartiality of the institutions."

{articleGUID}

But, according to Kamal Siddiqi, former editor of the English daily The Express Tribune, the government should have acted on the matter as soon as the protests started and not waited until it got out of hand.

"If somebody decides to stage a sit-in and occupy a certain city, the government should use whatever force is needed to disperse it on day one," Siddiqi told Al Jazeera.

"You set a precedence that nobody can block the roads at their whim. The government was cornered into acting like this because it let this go on for too long. It needs to be proactive instead of reactive."

The Islamabad Highway, used daily by thousands travelling from the city of Rawalpindi into the capital, was back to normal on Tuesday, with traffic flowing, shops open, and sanitation workers cleaning up the mess left behind by the protesters, according to AFP news agency.

Some citizens believed by giving in to the demands of the protesters, the government set a precedent on Monday.

"It's not a question of setting a precedent. It's more about discontinuing the precedent that has already been set during earlier sit-ins and protests," said Siddiqi.