French nationals and companies in Pakistan were advised by their embassy Thursday to temporarily leave after violent anti-France protests paralysed large parts of the country.

Anti-French sentiment has been simmering for months in Pakistan since the government of President Emmanuel Macron expressed support for a satirical magazine's right to republish cartoons depicting Prophet Mohammed -- deemed blasphemous by many Muslims.

On Thursday the Pakistan government banned an extremist political party whose leader had called for a march on the capital to demand the expulsion of the French ambassador.

Saad Rizvi, leader of Tehreek-e-Labbaik Pakistan (TLP), was detained hours after the Tuesday call, bringing thousands of his supporters onto the streets in cities across the country.

Thousands of hardline Islamist supporters took to the streets in anti-French protests across Pakistan this week
Thousands of hardline Islamist supporters took to the streets in anti-French protests across Pakistan this week AFP / Arif ALI

Two police officers died in clashes during which water cannon, tear gas and rubber bullets were used.

"Due to the serious threats to French interests in Pakistan, French nationals and French companies are advised to temporarily leave the country," the embassy said in an email Thursday to French citizens.

"The departures will be carried out by existing commercial airlines."

Extra security personnel were deployed to the French embassy -- inside a guarded diplomatic enclave closed to the public -- and shipping containers placed as fortifications around its outer wall.

"Our police and rangers are capable of handling the situation," Interior Minister Sheikh Rashid Ahmed told a press conference later Thursday.

Paramilitary soldiers stand guard in front of the French embassy in Islamabad
Paramilitary soldiers stand guard in front of the French embassy in Islamabad AFP / Aamir QURESHI

"All the French citizens are safe here and there's no threat to them."

Still, Ludo Van Vooren, a French citizen living in Islamabad, told AFP he was assessing the embassy's advice.

"We are a little shocked and reflecting on what to do," he said.

"Following the incidents of the last few months, we haven't been panicking, but we are very vigilant. Now we are trying to work out if things have changed."

Thousands of Tehreek-e-Labbaik Pakistan supporters took to the streets in cities across the country
Thousands of Tehreek-e-Labbaik Pakistan supporters took to the streets in cities across the country AFP / Aamir QURESHI

Last year around 445 French citizens and more than 30 companies were registered in Pakistan, according to a French government website.

The TLP is notorious for holding days-long, violent road protests over blasphemy issues, causing major disruption to the country.

Blasphemy is a hugely sensitive issue in conservative Pakistan, where laws allow for the death penalty to be used on anyone deemed to have insulted Islam or Islamic figures.

Successive governments have a long history of avoiding confrontation with hardline Islamist groups, fearing any crackdown on religious parties could spark wider violence.

"We are in favour of protecting the Prophet's honour, but the demand which they are seeking could have portrayed Pakistan as a radical nation worldwide," Interior Minister Sheikh Rashid Ahmed told a news conference on Wednesday.

On Twitter, the hashtag "#FranceLeavePakistan" was trending with more than 55,000 tweets as of Thursday afternoon.

Anger erupted in Autumn last year when the satirical magazine Charlie Hebdo republished cartoons of the Prophet Mohammed.

Macron's subsequent defence of free speech triggered anger across the Muslim world, with tens of thousands in Pakistan, neighbouring Iran and other Muslim countries flooding the streets and organizing anti-French boycotts.

TLP supporters brought the capital Islamabad to a standstill.

At the time, Prime Minister Imran Khan, a populist leader who has been known to play to Pakistan's hardline religious base, blasted Charlie Hebdo for re-publishing the cartoons, saying "wilful provocations" should be "universally outlawed".

He accused the French president of attacking the Muslim faith and urged Islamic countries to work together to counter what he called growing repression in Europe.

Weeks later, a Pakistani man attacked the former offices of the magazine in Paris, wounding two people.