Arab governments and Muslim leaders and organisations across the world have condemned the deadly attack in Paris, but it was praised by jihadi sympathisers who hailed it as “revenge” against those who had “insulted” the prophet Muhammad.

Saudi Arabia called it a “cowardly terrorist attack that was rejected by the true Islamic religion”. The Arab League and Egypt’s al-Azhar university – the leading theological institution in the Sunni Muslim world – also denounced the incident in which masked gunmen shouted “Allahu Akbar” – “god is great ” in Arabic.

Iran, Jordan, Bahrain, Morocco, Algeria and Qatar all issued similar statements.

No organisation claimed responsibility for the attack but supporters of the Islamic State (Isis), the militant organisation that now controls large parts of Iraq and Syria, welcomed it on social media, using Arabic language hashtags including “our revenge for the messenger (Muhammad)”, “Paris is Burning”, “Paris under Fire” and the “Lions of Tawheed [monotheism]”.

One Twitter user, apparently an Isis supporter, said: “This is the first reaction. You’ll not live in safety again.” Another described the French satirical magazine Charlie Hebdo as a Zionist newspaper.

“This proves that the Islamic State can strike deep in Europe whenever it wishes,” said another. A graphic posted by Abu Sari al-Iraqi showed the black flag of Isis flying over the Eiffel Tower, with the slogan in French: “We are everywhere.”

Reuters quoted an Isis fighter named Abu Mussab as saying: “The lions of Islam have avenged our prophet. Let these crusaders be scared because they should be.”

Many Arabic Twitter users, however, attacked the terrorists, one pointing out that Charlie Hebdo had made fun of Jews, Christians and Buddhists without its journalists being targeted and murdered.

The Union des Organisations Islamiques de France, which represents more than 250 Muslim organisations across the country, condemned the killings. Tariq Ramadan, a leading Muslim thinker, commented: “It is not the prophet who was avenged, it is our religion, our values and Islamic principles that have been betrayed and tainted.” The Muslim Council of Britain said: ”Whatever the cause may be, nothing justifies the taking of life.”

Other Muslims said they would only condemn the Paris attack if France condemned the killings of Muslims worldwide.

Charlie Hebdo has long been controversial because of the cartoons it has published portraying the prophet Muhammad, some in pornographic poses.

Observant Muslims anywhere would be angered by such images and that is especially true of fundamentalist Salafis, who adhere to traditions laid down in 7th-century Arabia, or of the small minority who hold to the jihadi-takfiri world view espoused by Isis and al-Qaida.

Their doctrines permit the killing of so-called apostates. But devout Sunni Muslims of all stripes avoid visual depictions of Muhammad or other prophets such as Moses or Abraham.

Islam is not unique. Judaism forbids the use of “graven images” and Christianity has at times frowned on visual representations of sacred figures, allowing only the cross to be depicted in churches.

The Qur’an does not explicitly forbid images of Muhammad, but several hadith (sayings and actions attributed to the prophet) prohibit Muslims from creating visual depictions of human figures. Traditionally, the concern has been that images may encourage idolatry, the scourge of the jahiliyya period of pre-Islamic Arabia.

The most common visual representation of the prophet Muhammad in Islamic art is by elaborate swirling Arabic calligraphy. The Qur’an is never illustrated.

The destruction by the Taliban in Afghanistan of statues of Buddha in Bamyan is a notorious example of the intolerance of images, part of the school of tawhid – Islamic monotheism. Sunni disapproval of Shia Muslim shrines reflects this too. Shias are more flexible than Sunnis and display images of Husayn, the grandson of Muhammad.

The differences between the two main branches of Islam are often compared to those between Protestants and Catholics in the Christian world. Isis in Iraq has demolished shrines to Sunni or Sufi figures, while Shia mosques have also been destroyed – hence the Iraqi Shia militiamen and Iranian Revolutionary Guards protecting the revered Sayyida Zeinab shrine in the Syrian capital, Damascus.

In a cartoon published just before the killings, Charlie Hebdo portrayed the Isis leader Abu Bakr al-Baghdadi, apparently based on a photograph of him preaching in a mosque after the capture of the Iraqi city of Mosul last June and his proclamation of a new caliphate. It sarcastically wished him “especially good health”.

Last October, it ran an image that portrayed Isis as being opposed to Islam by displaying an image of a masked man cutting the throat of his kneeling, turbanned victim, who is saying: “I am the prophet, you brute.” The killer replies: “Shut your mouth, you infidel.” The cartoon was captioned: “If Muhammad returned …”

In November 2010, the magazine’s office was hit by a firebomb and its website hacked after it announced plans for an edition with Muhammad as its chief editor, and the title page with a cartoon of him was posted on social media.