More than 100 years before militant Islamist gunmen murdered journalists at France's satirical magazine Charlie Hebdo, another magazine very similar in style was playing an important role among the Muslim populations of both the Russian and Persian empires.
Azerbaijani weekly magazine Molla Nasreddin was revolutionary for its time, bravely ridiculing clerics and criticising the political elite as well as the Russian Tsar and the Shah of Persia.
Founded in 1906, it pulled no punches in tackling geopolitical events and also promoted women's rights and Westernisation.
The editor-in-chief of the magazine was Jalil Mammadguluzadeh (known as Mirza Jalil), a famous Azerbaijani writer, who was also a well-known novelist.
In his book, The Dead, the main protagonist is a drunken atheist, treated as a madman for telling the truth about his backward society, where girls as young as nine are forced to marry 50-year-old men.
The magazine's title, Molla Nasreddin, came from the name of the naive but wise mullah, famous throughout the Middle East for his anecdotes.
On the cover of the first issue, Molla Nasreddin is shown waking "the sleeping nations of the East".
For more than 20 years, the magazine bearing his name would present the world to its readers through the medium of cartoons and text.
"The magazine's first issue exploded like a bomb," renowned writer Ebdurrehimbey Haqverdiyev recalled in his memoirs.
"Mullahs were saying that the magazine should not enter the house of any Muslim. If it does, they said, grab it with tongs and throw it down the toilet."
Molla Nasreddin addressed uneducated Azerbaijanis, unlike other publications of the time, which were heavily influenced by Anatolian Turkish, Russian or Persian.
The texts were in simple language and the cartoons were easy to understand, often targeting clerics, which the magazine's writers saw as the enemies of education and a secular society.
Mirza Jalil said his magazine was a product of its time, when the majority of the population was illiterate, ruled by the Russian and Persian empires and directed by religious leaders.
It was published in the Azerbaijani language (initially in Arabic script but later in Latin, with the start of the Soviet regime) but occasionally in Russian, too.
The following two cartoons are particularly forthright in the way they compare negatively the product of education at religious, "Asian schools" with the results from secular, European institutions.
Women were seen as having no rights in society or within their own families, and subject to oppression and beatings from their husbands.
The magazine clearly opposed the intervention of religion in the individual freedoms of a secular state.
But mocking clerics and campaigning for women's rights came with its own risks.
Mullahs in Persia issued a fatwa calling for Mirza Jalil's death. He was attacked in the Georgian capital, Tbilisi, where the magazine was published, and constantly threatened. The city was then the cultural capital of Russia's South Caucasus.
"Had I published the magazine not in Tbilisi but in Baku or Yerevan [capital of modern-day Armenia where Azerbaijanis made up the majority of the population at the time], they would have destroyed my office and killed me," Jalil explained.
For many of its readers, the magazine opened a window on world politics, but in satirical language.
The cartoon below shows the Ottoman sultan, who was fighting to recover the island of Crete from the Greeks, being given a shower by the "Great Powers".
Mirza Jalil was influenced by Russian writers, including Gogol and Chekhov.
He had a team of great cartoonists, such as Oskar Schmerling, a German who lived in Tbilisi, and an Azeri, Azim Azimzadeh.
There were also satirical poets, including Mirza Alakbar Sabir, who would promote education and women's rights in his poems, and many other bright minds.
The magazine played an important role in the foundation of the Azerbaijan Democratic Republic in 1918, which lasted just two years before the Bolshevik victory.
"Most of the ministers of the Democratic Republic were readers of Molla Nasreddin," says Azerbaijani media expert Zeynal Mammadli.
The magazine campaigned for women's rights and played an important part in women in Azerbaijan being granted the right to vote in 1919, at around the same time as women in the UK and US.
Sifting through old copies of the magazine in Azerbaijan's National Library, it becomes clear how daring the writers and illustrators of Molla Nasreddin were.
In a 1929 edition, a cartoon was published of the Prophet Mohammad, although without depicting his face.
By this time Azerbaijan was a Soviet state and publication was taking place in the capital, Baku. Nevertheless, the majority of the population were still conservative Muslims.
The cartoon features a dialogue between Jesus and Muhammad and shows people drinking at Christmas.
It clearly poked fun at Muslims who drank, despite their religion prohibiting consumption of alcohol.
But the magazine was not to last.
By the early 1930s, the authorities told Mirza Jalil to change its name to Allahsiz (Godless) and follow the principles of Soviet ideology.
Unable to accept Soviet censorship, his relationship with the magazine came to an end.