A politician in Brazil who proposed legislation that would allow psychiatrists to treat homosexuality as a disease has withdrawn the bill before giving representatives a chance to vote on it.

It was approved last month by the Congressional Human Rights Commission and Minorities – but was withdrawn on Tuesday.

The bill would have lifted a 1999 ban on the “treatment” of homosexuality, which was established by Brazil’s Federal Psychology Council.

Joao Campos, a member of the evangelical block of the Lower House in Brazil’s Parliament, withdrew the bill as it became clear that the legislation was going to be roundly defeated.

“Today we are celebrating,” said Guilhermina Cunha, vice president of a Brazilian LGBT rights group. “The next step, however, and we we’re not yet sure how to do it, is to remove Feliciano from his position.”

The reference is to Marco Feliciano of the Social Christian Party.

As chair of the Congressional Human Rights Commission and Minorities he gave approval to the bill in June.

He had previously referred to AIDS as a “gay cancer”.