PARIS - Fresh protests erupted in the Muslim world Wednesday over an anti-Islam film as a French magazine poured fuel on the fire with the publication of obscene cartoons showing the Prophet Muhammad (PBUH).

France braced for a backlash from the cartoons published by satirical magazine Charlie Hebdo, stepping up security at its embassies and banning demonstrations on its own soil as senior officials appealed for calm.

French Foreign Minister Laurent Fabius admitted that he feared a backlash over the publication of cartoons and said embassies and other French institutions in around 20 countries have been closed for fear of being targeted in protests after weekly prayers.

More than 30 people have been killed in attacks or violent protests linked to the controversial US-made film, including 12 people who died in an attack by a female suicide bomber in Afghanistan on Tuesday.

About 1,000 protesters took to the streets in eastern Afghanistan, blocking a key road to Kabul and chanting “Death to America” and “Death to the enemies of Islam”.

French Prime Minister Jean-Marc Ayrault said anyone offended by cartoons could take the matter to the courts but made it clear there would be no action against the weekly.

“We are in a country where freedom of expression is guaranteed, including the freedom to caricature,” he said.

“If people really feel offended in their beliefs and think there has been an infringement of the law - and we are in a state where laws must be totally respected - they can go to court,” Ayrault said.

Leaders of the large Muslim community in France said an appeal for calm would be read out 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 US was taking “aggressive steps” to protect diplomatic missions worldwide.

US President Barack Obama said Tuesday he expected governments in the Muslim world to protect American diplomats, despite their revulsion at the film.

“The message we have to send to the Muslim world is that we expect you to work with us, to keep our people safe,” Obama said.

On a visit to Lithuania on Wednesday, Afghan Foreign Minister Zalmai Rassoul condemned the film and the French cartoons as provocations.

“We are living in a world where everybody should respect the belief of others,” he said.

“We need to make sure that a minority of people cannot disturb the peaceful cooperation that we are building with the world as a whole.”

Muslim men and women in Buddhist-majority Sri Lanka also staged their first demonstration on Wednesday, with several hundred gathering in the capital Colombo near the US embassy to denounce the film.

Women used broom sticks to beat photographs of Obama while men threw slippers at US and Israeli flags.

Afghanistan, Bangladesh and Pakistan blocked access to YouTube following the site’s release of the clip of the film.