As protests again erupted across the Muslim world on Wednesday over an anti-Islam film, a French magazine poured fuel on the fire by publishing obscene cartoons depicting the Prophet Mohammed.
France braced for a backlash over the caricatures, stepping up security at its embassies and banning demonstrations on its own soil as senior officials and Muslim leaders appealed for calm.
Paris said that on Friday, the Muslim day of prayer, it would shutter its diplomatic missions, cultural centres and French schools in around 20 Muslim countries for fear of violent protests.
More than 30 people have been killed in attacks and violent protests linked to the film "Innocence of Muslims", including 12 people who died in an attack by a female suicide bomber in Afghanistan on Tuesday.
The crudely made film -- which was produced by US-based extremist Christians and depicts the Prophet as a thuggish womaniser -- has triggered protests in at least 20 countries since excerpts were posted online.
In Pakistan, around 1,000 students from the fundamentalist Jamaat-e-Islami party took to the streets in the eastern city of Lahore on Wednesday, chanting anti-US slogans and burning the American flag.
A similar number demonstrated in Karachi, torching an effigy of US President Barack Obama, while in Islamabad, around 500 lawyers burst into the capital's diplomatic enclave, chanting anti-American slogans and castigating the government for not taking strong action against the film.
The Pakistan government declared Friday a national holiday in honour of Mohammed, in a sudden announcement made after religious parties had called for a day of protest.
In neighbouring Afghanistan, about 1,000 protesters took to the streets, blocking a key road to Kabul and chanting "Death to the enemies of Islam."
Indonesia saw hundreds of protesters tear up the American flag and throw eggs at the US embassy in the capital Jakarta.
In Lebanon, gunmen opened fire on a KFC fast-food restaurant, just days after another outlet of the US chain was torched and a demonstrator killed in a protest over the film. No one was hurt in Wednesday's attack.
The Shiite movement Hezbollah's leader, Hassan Nasrallah, has called for a string of protests all week in Lebanon to denounce the film which he described as the "worst attack ever on Islam".
schools Muslim men and women in Buddhist-majority Sri Lanka also staged their first demonstration on Wednesday, with hundreds gathering in the capital Colombo near the US embassy to denounce the film.
In reaction to the uproar, the French satirical magazine Charlie Hebdo published cartoons mocking the film and caricaturing the Muslim prophet, including two drawings showing him naked.
The magazine's website was put out of action by a cyber-attack Wednesday.
Riot police were deployed outside the magazine's Paris offices.
Al-Azhar, Sunni Islam's highest authority, condemned the publication of cartoons, while the Vatican's official daily Osservatore Romano said that the satirical images could throw "fuel on the fire".
Charlie Hebdo's editor, Stephane Charbonnier, described those getting irate over the cartoons as "ridiculous clowns" and accused the government of pandering to them by criticising him for being provocative.
"It is like saying a woman who has been raped is to blame because she wore a mini-skirt," he said. "We are provocateurs, we are wearing a mini-skirt. But who is guilty: the person in the mini-skirt or the rapist?"
The left-wing publication's offices were firebombed last year after it published an edition "guest-edited by Mohammed" that it called Sharia Hebdo.
French Prime Minister Jean-Marc Ayrault said anyone offended by the cartoons could go to court, but he also stressed that in France "freedom of expression is guaranteed, including the freedom to caricature".
Foreign Minister Laurent Fabius said he feared a backlash over the cartoons and announced Friday's embassy and school closures.
Germany, whose Sudan embassy was torched in the wave of protests, advised its citizens to avoid public gatherings in many Arab countries on Friday.
Leaders of the Muslim community in France -- the largest in western Europe -- said an appeal for calm would be read in mosques across the country on Friday but also condemned the magazine for publishing "insulting" images.
Washington has also moved to boost security in the wake of the protests, with Secretary of State Hillary Clinton saying the United States was taking "aggressive steps" to protect diplomatic missions worldwide.
Among those killed in the protests so far have been four US diplomatic staff in Libya, including ambassador Chris Stevens.
The director of the US National Counterterrorism Center Matthew Olsen described the killings as "a terrorist attack", although he added that it was likely an "opportunistic attack".
Pakistan, along with Afghanistan and Bangladesh, blocked video-sharing website YouTube this week after it failed to remove the offending film.
Google-owned YouTube has restricted the video in countries where it is illegal, including Saudi Arabia, Egypt, Libya, India, Indonesia and Malaysia.
The maker of the film, Egyptian Copt Nakoula Basseley Nakoula, 55, a fraudster who was sentenced to 21 months in prison in the United States in June 2010, not been seen since Saturday when he was questioned.