Tunisia is among the most open and democratic countries in the Middle East/North Africa region. Nevertheless, troubling patterns with regard to free expression in the realm of religion persist. Islam is still the country's official religion, and the country still maintains and enforces various laws against "inciting religious hatred" and against speech that transgresses against public morals and decency, vaguely defined. These assure that the country has a de facto blasphemy prohibition. Enforcement of the laws in response to religiously "offensive" expression is perhaps less common than blasphemy prosecutions in some neighboring countries, but it can and does occur.
The Islamization of Tunisia began in the later seventh and early eighth centuries, when Muslims conquered the lands that today constitute the country. The process, however, stretched out several centuries, as the Romans had left a historical legacy of Christianity in the region. Nevertheless, Tunisia became one of the first outposts of Islam in its part of North Africa, and Islam eventually became the dominant and almost sole religion of its people (ethnic Berbers).
Control of the region passed through the hands of individual Islamic dynasties until the Ottoman conquest in the sixteenth century. Codified punishments for blasphemy and their enforcement varied throughout the centuries, though in 1858, the Imperial Ottoman Penal Code, inspired by French jurisprudence, decriminalized apostasy while still setting a punishment of up to three months' imprisonment for blasphemy. Two decades later, the French themselves invaded and established a Tunisian colony.
Independence came for Tunisia in 1956. A penal code that went into effect in 1913 under French rule remained with the country, though it has been periodically amended. Currently, Tunisian law punishes blasphemy by making use of various other offenses enshrined in the penal code, some explicitly religion-related and some not; this includes a provision against "inciting religious hatred" and others that punish acting against public morals and decency. Thus, blasphemy is effectively punishable with imprisonment in Tunisia.
The Tunisian Revolution took place in the midst of the broader Arab Spring protests of the early 2010s. The country that emerged, complete with a new constitution in 2014, stands as one of the only partial success stories of the Arab Spring. However, the new constitution failed to separate religion and state, establishing Islam as the state religion. The gamut of legislation used to prosecute blasphemy remains in force and has been utilized as recently as 2020, when blogger Emna Chargui was sentenced to six months' imprisonment for a Facebook post deemed insulting to religion.