Uruguay has opted to lift a ban on gays serving in its military.

The ban was imposed under the 1973-85 military dictatorship. Under it, people with “open sexual deviations”, which includes homosexuality, were banned from entering the military academies.

The ban also included homosexuality among the “mental illnesses and disorders” that legally made a person unsuitable to join the armed forces.

President Tabaré Vázquez confirmed he had signed the bill, saying his administration does not discriminate against citizens on the basis of ethnicity, political beliefs or sexual orientation.

In December 2007, Uruguay’s Congress passed legislation to recognise same-sex civil unions.

The country of 3.6m people was the first nation in South America to grant such protections, although some cities and regions throughout the continent have made similar legal provisions.

The Congress passed legislation creating a civil union registry for same-sex and unmarried heterosexual couples who have lived together for at least five years.

Senator Margarita Percovich, the author of the legislation, said the bill would give couples entering civil unions the same rights as marriage, such as heath benefits, inheritance, parenting and pension rights.