ROME (AP) — An Italian-Moroccan student has been freed by Moroccan authorities after she was detained on blasphemy charges after she arrived in June to visit relatives, Italian officials said Monday.

Italy’s Foreign Ministry said Ikram Nazih, 23, had been convicted of “offenses against religion” for having shared a satirical cartoon on Facebook in 2019. The Italian newspaper Domani, which had championed her cause, said the cartoon had transformed a verse of the Quran into a verse about whisky.

A lawmaker with the right-wing League Party who had brought Nazih’s case to Parliament’s attention, Massimiliano Capitanio, rejoiced over her release. He said he had taken up the case not only because Nazih is an Italian citizen from Vimercate, a Milan suburb he represents, but “because a 23-year-old young woman cannot be incarcerated because of a Facebook post.”

“Our young people have the right to a future of freedom and serenity,” he added in a Facebook post.

Domani said Nazih, who was born to Moroccan parents and is a student at the University of Marseille, had been detained upon arrival in June after she travelled to Morocco to visit relatives. It said she had been convicted June 28 and sentenced to more than three years after a religious group in Morocco had lodged a formal complaint against her for the Facebook post, which she had cancelled.

The foreign ministry thanked Italy’s ambassador in Rabat for his efforts, which it said were aimed solely at Nazih’s well-being “in full respect of the work of Morocco’s institutions and judiciary.”