After the brutal assassination of two visitors and eight of its staff members, the French satirical magazine Charlie Hebdo has vowed to continue its trademark irreverence and secular iconoclasm, which critics have accused of being Islamophobic, anti-Semitic and anti-Christian.

Its first issue since the tragic massacre features a cartoon of a tearful Prophet Muhammad holding a sign showing the famous twitter hashtag "Je Suis Charlie." The turbaned figure stands under the slogan "All is forgiven."

As a staunch advocate of freedom of expression, I believe the publication has every right to run such a cartoon, even if their decision would upset the religious sensibilities of some Muslims such as Egypt's grand mufti, Shawqi Allam, who blasted the cartoon as racist.

The caricature drove me to consider some hypothetical questions: What would Muhammad make of this? Would the prophet forgive Charlie Hebdo's lampooning of him and his religion? If he were alive today, would he tweet his solidarity with the slain cartoonists?

My own reading of Muhammad's life and history leads me to conclude that although the prophet may not have tweeted "#JeSuisCharlie," he would have condemned these savage murders and even forgiven French satirists no matter what insult was directed his way.

There was so much freedom of thought and expression in the early centuries of Islam that it would put much of the current Muslim world to shame.

While some might find my assertion hard to believe, it is backed up by Muhammad's own actions and convictions. Although the prophet's contemporary self-appointed defenders take offence on his behalf and believe they are doing his will by protesting perceived insults or punishing those who commit them, their actions could not be further from the truth.

During the vulnerable early years of Islam, the Islamic prophet endured and tolerated mockery and disdain. Even in victory, Muhammad wisely advised to exercise tolerance. Upon his triumphant return to Mecca, he forgave the inhabitants of the city which had been home to his fiercest enemies. He even pardoned a member of his inner circle, Abdullah Ibn Saad, who denounced the prophet as a charlatan.

More importantly, the Islam Muhammad preached recognised the pluralistic nature of society and guaranteed freedom of belief. Surat al-Baqara of the Quran reminds Muslims: "There shall be no compulsion in religion."

Significantly, the constitution Muhammad drew up in Medina included in its definition of the "umma" all the oasis' inhabitants, not just its Muslims. These included both the "people of the book", ie: Christians and Jews, but also, perhaps surprisingly, pagans - all of whom were granted equal political, cultural and religious rights as Muslims.

There was so much freedom of thought and expression in the early centuries of Islam that it would put much of the current Muslim world to shame. Although many contemporary Muslims are convinced that ridiculing Islam and rejecting religion are western innovations, this is closer to wishful thinking than historical fact.

In Christendom, Muhammad and Islam was derided from a rival religious vantage point; that the prophet of Islam was believed to be the false prophet of a fake religion. He was even condemned to the ninth circle of Dante's inferno where he supposedly stands "rent from the chin to where one breaketh wind".

Within the Islamic world itself, Muhammad and Islam were criticised and mocked from a secular, rationalist, anti-religious perspective.

One example is the religious sceptic and scholar Ibn al-Rawandi (827-911) who, despite his rejection of religion and Islam, lived a long life in the 8th-9th centuries.

Rawandi, who spent a significant part of his life in Baghdad, believed that intellect and science supersede all else, that prophets were unnecessary, that religion was irrational, that Islamic tradition was illogical and that miracles were a hoax.

In neighbouring Syria, a few decades later, the Richard Dawkins of the Abbasid era was born. Abu al-Ala' al-Maarri (973-1058) was so contemptuous of religion that he divided the world into two types of people: "Those with brains, but no religion, and those with religion, but no brains."

Maarri also lived to a ripe age. Rather than being visited by assassins, he attracted many students and engaged with scholars of various persuasions, even when he decided to return to his hometown of Maarra to live ascetically in seclusion.

Although this tradition of free thought and scepticism has shrunk over the centuries, it still exists. It even witnessed resurgence in the 20th century - and included the "Dean of Arab Literature", Taha Hussein - until the conservative Islamist current started to block it in the late 1970s/1980s.

The years since the revolutionary wave in 2011 have seen secularists, sceptics and atheists mounting a comeback. But with some countries equating non-belief to terrorism and arresting atheists, theirs is a risky venture.

But these efforts are essential. Freedom of thought and expression were vital components of Islam's golden age and lifting Arab and Muslim countries out of their current plight will require a return to that era of free inquiry.

Khaled Diab is an award-winning Egyptian-Belgian journalist, writer and blogger. He is the author of Intimate Enemies: Living with Israelis and Palestinians in the Holy Land. He blogs at www.chronikler.com