Image copyright EPA Image caption The Islamist had spent weeks protesting against the law minister

Pakistani Islamists who clashed with police at the weekend have called off national protests after the resignation of Law Minister Zahid Hamid.

Reports from Islamabad and other cities say protesters are starting to leave.

They have been blocking a main road in the capital for weeks saying Mr Hamid should be sacked for blasphemy. He apologised for what he called an error.

At least six people are believed to have been killed when clashes erupted on Saturday and some 200 were injured.

The civilian government is being criticised for backing down in the crisis, which raises new questions about the military's role in Pakistani politics.

"On the assurance of the chief of army staff, we are calling off the sit-in," protest leader Khadim Hussain Rizvi told several thousand demonstrators from the Tehreek-i-Labaik Ya Rasool Allah Party in Islamabad on Monday.

The law minister was accused by the protesters of blasphemy after a reference to the Prophet Muhammad was left out of a revised version of the electoral oath. He called it a clerical error.

Protests against Mr Hamid had gone on for weeks and spread from Islamabad to other cities like Lahore, Peshawar and Karachi.

During Saturday's clashes, the government also suspended private news channels and blocked certain social media networks.

Image copyright EPA Image caption Protests escalated into violence on Saturday

"The decision to resign was taken in a bid to steer the country out of the prevailing critical situation," Mr Hamid was quoted as saying by Pakistan's Tribune newspaper.

According to the Dawn newspaper, the protesters have in turn agreed not to issue a fatwa, or Islamic religious ruling, against the minister.

Government officials gave way on all the Islamist demands, including freeing arrested protesters and paying for the clean-up operation.

They also expressed gratitude to the military for brokering the agreement and thereby "averting a grave national disaster".

Can the government survive?

By M Ilyas Khan, BBC News, Islamabad

To say the government signed under duress is no exaggeration. It's seen by many here as having capitulated and the military's image has been bolstered. But the question is, having wriggled out of a tight spot now, will the government be able to fight another day?

Since 1988, when a form of controlled democracy was introduced in Pakistan, the military is widely believed to have worked behind the scenes to prevent elected governments from making independent decisions on security and foreign policy. Common tactics to challenge the legitimacy of the politicians include corruption proceedings and Islamist street power.

It's still too early to predict if former Prime Minister Nawaz Sharif's personal popularity with voters in the country's most populous province, Punjab, has been affected by the protests.

His disqualification by the Supreme Court in July was expected to trigger defections in his PMLN party, which is still in power, ahead of elections due in May 2018. But that has not happened.

Many believe the so-called "mullah protest" was meant to embroil the PMLN in a religious controversy and rob it of its right-wing vote bank in Punjab.