Two teenage girls were kissing and hugging on a rooftop in Marrakesh, Morocco, late last week when one of their cousins took their photo.

After seeing the photo, the mother of one of the girls called the police, who immediately arrested them and took them to jail. The girls now face up to three years in prison for their crime: an act of homosexuality.

The two girls, 16 and 17, were held in an adult prison — instead of a juvenile detention center — for about three days, Larbi Elhabbache, vice president of the Marrakesh chapter of the Moroccan Association of Human Rights, said in a phone interview with the Post. The association learned about the arrest through an acquaintance of one of the girls and is now communicating with the girls’ lawyer, Elhabbache said. The girls were scheduled to appear in a court hearing Friday.

The girls are being charged with “licentious or unnatural acts with an individual of the same sex” under Article 489 of the Moroccan penal code, according to a statement from L’Union Feministe Libre, an organization that said it met with the 17-year-old’s mother. Punishment can range from six months to three years in prison.

L’Union Feministe Libre strongly condemned the arrest as well as “the treatment they are suffering in prison,” it wrote.

“We call out the feminist’s movement, human rights associations and Moroccan lawyers to end the series of arrests Moroccan Men and Women face on daily basis and the injustice we are now living in.”

The arrests spurred outrage on Twitter, where some urged people to use the hashtag #freethegirls.

Human Rights Watch has called for Morocco to repeal its laws criminalizing consensual same-sex conduct. Such laws violate rights — such as the right to privacy and the right to nondiscrimination — that are protected by the International Covenant on Civil and Political Rights, Human Rights Watch wrote. The United Nations Working Group on Arbitrary Detention has ruled that arrests for such conduct are, by definition, arbitrary.

In spring of this year, a Moroccan court convicted a man for homosexual acts after he was beaten in his home and dragged naked onto the streets, Human Rights Watch wrote. A video clip appeared online with the assailants apparently uttering anti-gay slurs and “call the authorities.”

In July of last year, two women were arrested in Morocco on charges of “gross indecency” for wearing skirts after a market trader called out their clothing, the BBC reported. An article in the penal code says that anyone found guilty of “public obscenity” can face up to two years in jail.

On April 1, Morocco’s Ministry of Justice unveiled a new proposed penal code that would supplement numerous provisions already criminalizing extramarital relations, homosexuality and the public consumption of alcohol.

A “surprising sense of revolt” spread across Moroccan social media in response to the proposed penal code, Merouan Mekouar wrote in the Post.

Elhabbache, of the Moroccan Association of Human Rights, said the group stands with the two girls arrested last week and with “every person who is arrested for their sexual desires.” It continues to call for a change in the country’s penal code.

But, Elhabbache said, religion is ingrained in Moroccan social and daily life, and the reaction to acts expressing homosexuality is quite “severe” in the country.

“It’s difficult and it will take a lot of time,” Elhabbache said. “We are not strong enough to force the country to change the laws.”

More from Morning Mix

A ‘colossal failure’ by prosecutors: Juror defends verdict in Oregon standoff trial

‘Help me. Get me out of here.’ Missing woman found chained ‘like a dog’ in metal container.

‘Mortal sin’ to vote Democratic, says San Diego Catholic church flier, linking Hillary Clinton to Satan