Three Lebanese teenagers who were hauled before a court on charges of insulting Christianity have been handed the unusual sentence of studying the references to the Virgin Mary found in the Quran.

Christian judge Joceline Matta found the Muslim boys guilty of ‘contempt of religion’ for insulting the Christian mother of God. The charge, which covers verbal insults or physical defiling of religious rites and objects, can be punishable by up to three years in prison.

However, when reading out her verdict in court in the northern city of Tripoli last week, the Justice said that she wanted the teenagers to learn about Islam’s reverence for the mother of Christ, calling the law “a school and not just a prison”.

Art exhibition in Lebanon shut down by people trying to erase imperialism from their history

Islam also regards Jesus as a major prophet of Allah. Mary is honoured in several Islamic texts, including the Al-Omran surah, which reads “And [mention] when the angels said, 'O Mary, indeed Allah has chosen you and purified you and chosen you above the women of the worlds.'”

A chapter of the Quran is named after her - which Judge Matta said showed revealed the boys’ ignorance of their own religion.

The three must learn verses from the Al-Omran surah in order to be released, she said.

For a real taste of Lebanon, go back to the land Show all 3 1 /3 For a real taste of Lebanon, go back to the land For a real taste of Lebanon, go back to the land Food for thought: The farmers' market in Beirut is one of Souk-el-Tayeb's ways of connecting the land to the city KAMAL MOUZAWAK For a real taste of Lebanon, go back to the land Fadia is one of the few people still moulding terracotta pots KAMAL MOUZAWAK For a real taste of Lebanon, go back to the land Diaa makes a flatbread at the festival near Anjar KAMAL MOUZAWAK

The decision was praised by several prominent Lebanese public figures and politicians and caused a stir on social media.

Prime Minister Saad Hariri said the sentence was the “epitome of justice” and promotes coexistence between Muslims and Christians together through the “teaching of common ideas”.

Lebanon was torn apart by sectarian violence between various Muslim, Christian and Druze factions in the 1975-1990 civil war, which killed an estimated 120,000 people.

Under the constitution, which emphasises religious harmony, the president must be a Maronite Christian, the prime minister a Sunni Muslim, and the speaker of parliament a Shiite Muslim.