A military court in Lebanon has acquitted four military personnel accused of sodomy in a landmark ruling, according to local media.

Judge Peter Germanos on Saturday cleared the group of charges of committing sexual acts “contrary to nature” and declined to issue warrants for their arrest, the Daily Star, a Beirut-based daily, reported.

Germanos told the newspaper that “sodomy is not punishable by law” as the country’s penal code did not specify what “kind of relationship can be considered ‘contrary to nature'”.

The four people referred to the court had been dismissed from their posts, the daily said.

Civilian courts in Lebanon have previously ruled consensual sex between people of the same sex as not unlawful. Germanos’s decision marked the first such ruling by a military tribunal, according to the Daily Star.

In July last year, an appeals court declined to convict nine people arrested in a Beirut suburb, who were charged under Article 534 of Lebanon’s penal code.

The law punishes sexual intercourse “contrary to the order of nature” with up to one year in prison.

Human Rights Watch, a US-based rights group, described it as a “colonial relic” that has at times been wielded against gay and transgender people in Lebanon.