French imams condemned violence committed in the name of Islam during Friday prayers as the country reeled from the double hostage dramas that followed the massacre at Charlie Hebdo magazine.

The same message -- distancing the country's five million Muslims from the jihadists responsible for the attacks -- was relayed at more than 2,300 mosques across France.

"We denounce the odious crimes committed by the terrorists, whose criminal action endangers our willingness to live together," said the rector of the Grand Mosque of Paris, Dalil Boubakeur.

He also appealed to "all the Muslims of France" to take part in demonstrations planned for Sunday to pay homage to the 12 victims of the attack on Charlie Hebdo on Wednesday, the bloodiest in France in more than half a century.

In local mosques across the country, imams condemned the jihadists who claimed they were avenging the Prophet Mohammed by shooting dead some of France's best-known cartoonists at the satirical weekly.

Charlie Hebdo had angered many Muslims by repeatedly publishing cartoons that featured the Prophet as it lampooned Islamist extremists.

Muslim groups had taken the magazine to court over the drawings but had lost.

"The people who carried out that attack in the name of Islam are not Muslims... The Prophet did not advocate violence against non-Muslims," Abdel Qader Achour, of the conservative Omar Ibn Al Khattab mosque not far from Charlie Hebdo's offices, insisted.

"France is our country, we have been here for three or even four generations, and we should not be afraid," he said as around one thousand of the faithful gathered to pray.

"To a cartoon you reply with a cartoon, to a drawing with a drawing, to a newspaper article with a newspaper article... But you don't reply with guns," said Mustafa Riad of the Union mosque in the southern city of Montpellier.

Muslim theologian Tareq Oubrou, an imam in Bordeaux, in the southwest, said Muslims were furious that their religion had been "confiscated by crazies... and uneducated, unbalanced people".

Fear of rise in hostility

Muslim leaders fear that the Charlie Hebdo attack will lead to further hostility and attacks against their community.

Prime Minister Manuel Valls insisted Friday that France was "in a war against terrorism", but not "against a religion", and President Francois Hollande appealed for a halt to emotive rhetoric and "stigmatisation and sorry caricaturing" of others.

Since Wednesday's attack, shot have been fired and grenades thrown at several Muslim places of worship without causing injuries.

Four shots were fired at the front of a mosque in Albi in the south and racists slogans scrawled on another in Bayonne in the southwest. On Friday a pig's head and its entrails were found hanging from the door to a prayer hall in Corte on the island of Corsica.

"I am afraid that their acts will get worse in the coming days," said Abdallah Zekr, the president of the French Muslim Council (CFCM), which monitors Islamophobic attacks.

"Muslims are caught in a trap, between those who kill in the name of Islam and those who are using this to stigmatise Muslims," he said.

Up to 390 French jihadists are thought to be fighting in Syria, according to the latest estimates, and around 60 have died fighting with extremist groups there.

Muslim Amine Guellil, a 47-year-old estate agent, said: "A good Muslim would never shoot anyone, those who do that cannot be Muslims."

Two of the victims of the Charlie Hebdo massacre were Muslims, with policeman Ahmed Merabet shot in cold blood as he tried to stop the terrorists fleeing the seen, he said.

"There are several million Muslims in France, and the vast majority are integrated into French society," said Claude Dargent, a professor at Sciences Po university in Paris. "And for those who aren't, it's less a question of religion than their social and economic situation."