The girls, aged 16 and 17, had faced up to three years in prison according to a law forbidding “lewd or unnatural acts with an individual of the same sex.” One of their mothers reported them to police in October.
The charges angered LGBT rights groups, who have long argued that same-sex relationships should not be a crime.
The judge in Marrakech ruled on Friday that the girls must remain under parental authority until they turn 18.
Their defense lawyer, Rachid El Ghorfi, expressed relief at the acquittal and said: “They should have never been in front of the prosecutor or the judge.”
A passer-by had photographed them and sent pictures to the families of the girls who informed the police, and the two girls were arrested on the same day, it was reported.
Women and girls rarely are charged under Morocco's law prohibiting homosexual activity.
Human Rights Watch group has previously urged the Moroccan government to consider repealing the relevant penal code, arguing: “Repealing the ban on same-sex acts among consenting adults would both affirm Moroccans’ right to privacy and help to protect people from hate crimes.”
Join our new commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies