AKORA KHATTAK, Pakistan — Several thousand people gathered Saturday near the Afghan border to mourn the death of Maulana Sami ul-Haq, 82, a leading Sunni cleric and “father of the Taliban” who was stabbed to death by unknown assailants.

Officials and religious leaders from across the ideological spectrum in Pakistan and Afghanistan joined students from the renowned seminary in Akora Khattak where Haq taught and mentored two generations of Afghan Islamist fighters.

Haq’s mysterious slaying Friday was a shock to the nation, coming amid several days of nationwide violent protests by traditionally moderate Sunni groups in Pakistan enraged by the Supreme Court’s acquittal of a Christian woman convicted of blasphemy.

The packed funeral was a momentary pause in the nation’s divisive turmoil as well as a tribute to Haq’s multifaceted influence on the country.

He was a radical Islamist scholar – often called by the title of respect, maulana. But he was also a respected political leader and legislator, and a humanitarian who famously issued a religious fatwa condemning Islamist militants for attacking health workers distributing the polio vaccine.

“We are all shocked, but also happy, because our respected maulana has become a martyr at this late stage of life,” said one teenage seminary student named Ikram Abbasi, who traveled hours on a bus with a group of classmates to attend the service. “He is a great leader, and he is a martyr for Islam.”

In the capital, Islamabad, and other cities, calm returned Saturday after anti-blasphemy groups called off four days of massive street protests. Their leaders professed to be nonviolent lovers of the prophet Muhammad, but they exhorted angry crowds to block highways, set fires and throw stones. Some called for a military mutiny and the deaths of the justices who on Wednesday overturned the blasphemy conviction of Asia Bibi after she spent nine years in prison.

The Pakistani government paid a high price for achieving that calm, by conceding to most of the protesters’ demands after hours of negotiations Friday night.

Faisal Siddiqi, a lawyer writing in Dawn newspaper, said the court ruling had set the tone “for a much larger, existential issue facing the country: whether Pakistan is actually becoming a theocratic state in which vigilantism prevails,” or whether the ruling is a “watershed moment” that will allow the Muslim-majority country to move ahead as a “modern constitutional state.”

Many people had praised Pakistan’s new Prime Minister Imran Khan after he gave a stern warning to the protesters in a televised speech Wednesday night.

Khan called their aggressive behavior and threats “deplorable,” said they were not acting “in service to Islam,” and asked them not to clash with the laws of a democratic state.

But by Saturday, with Khan away on a visit to China, critics expressed disappointment that his resolve had crumbled, and said this would further embolden a radical religious movement that has drawn support from millions of mainstream Sunni Muslims.