Venezuela's Supreme Court on Thursday annulled a controversial article of the military justice code that had criminalised homosexuality within the armed forces.
The court annulled the provision, which had provided for a penalty of up to three years in prison, "for lacking sufficient clarity and legal precision with regard to the conduct it intended to punish," the court stated on its website.
It had called for punishment against members of the military who committed "sexual acts against nature" but failed to define what that meant, the statement said.
The article was not compatible with the constitution or progress in human rights, the court added.
Members of the LGBTQ community in conservative Venezuela welcomed the decision.
"After so many years of struggle we have achieved the nullity of the article of the military justice code," activist Leandro Viloria told AFP.
A military officer who was expelled after the armed forces learned he was gay told AFP that the annulment of the article opens the possibility for him to request his reinstatement.
"Now it is a matter of evaluating if given that situation my reinstatement proceeds – at least with this the fear will disappear," he said, speaking under condition of anonymity.