The girls were charged after they were seen "hugging and kissing"
Two girls charged with homosexuality offences in Morroco have been acquitted, according to one of their lawyers.
The 16-year-old and 17-year-old were arrested in October and detained for a week on charges of taking part in a “licentious or unnatural acts with an individual of the same sex”.
They were released on bail until their trial but on Friday a judge decided to release them definitively into the custody of their parents, said defence lawyer Rachid al-Ghorfi.
They were not sanctioned under article 489 of the penal code which criminalises what it calls “sexual deviancy” between two people of the same gender, he added.
If found guilty, the girls faced jail sentences of up to three years.
The girls denied being in a sexual relationship, saying they were only friends.
About 20 rights groups in a statement had denounced their arrest and said the girls had been ill-treated from the time of their arrest and throughout the legal proceedings.
Morocco, a country of 35 million people torn between religious conservatism and openness to the west, has seen several controversial cases relating to homosexuality in recent years.
Last month, New York-based Human Rights Watch called on authorities to drop the charges against the girls.