ISLAMABAD, Pakistan — A hard-line Islamist group on Sunday took six Pakistani security personnel hostage after days of deadly clashes in the northeastern city of Lahore over a French satirical newspaper’s publication of cartoons depicting the prophet Muhammad and the arrest of the group’s leader by Pakistani authorities.

A senior police officer and two paramilitary fighters were among those taken after protesters surrounded a police station and stormed the compound, according to Lahore police spokesman Arif Rana. A week of violence across the country has left at least four dead, according to the protesters. Police officials say thousands have been arrested.

The tensions driving the protests, led by the Islamist party Tehrik-e-Labbaik Pakistan, have been simmering for months after French President Emmanuel Macron honored a teacher who was beheaded last year in France after he showed a class the cartoons depicting Muhammad. For many Muslims, depictions of the prophet are blasphemous and deeply insulting.

Macron’s comments sparked protests across the Muslim world last year. In Pakistan, Tehrik-e-Labbaik demanded that authorities ban the import of French products and expel the French ambassador. Protests earlier this year were quelled only when Pakistani authorities agreed to consider the group’s demands, pledging to make a decision by April 20.

As the deadline approached, Pakistan’s Interior Ministry arrested the group’s leader, Saad Rizvi, citing intelligence that he and his followers planned attacks on April 20 if the French ambassador was not expelled.

The arrest sparked another round of nationwide protests, which turned violent when protesters blocked highways leading in and out of major cities. Prime Minister Imran Khan responded by banning Tehrik-e-Labbaik and all television coverage of the protests.

But images of the violence spread on social media through dozens of videos, some depicting people carrying away the injured. The videos could not be independently verified by The Washington Post.

On Thursday, the French Embassy advised all French nationals and companies to temporarily leave Pakistan “due to the serious threats to French interests,” according to an Agence France-Presse report.

George reported from Kabul.