The Norwegian government has apologised to homosexual men for a law that once made the act of gay sex illegal in the country.

It is believed that 119 individuals were sent to prison between 1902 and 1950 under the legislation, which was abolished on 21 April 1972.

The day before the 50th anniversary of this, Prime Minister Jonas Gahr Støre issued an official apology on behalf of the government for the legislation ever being in place.

“Through legislation, but also through a network of sanctions, we as a nation and society made it clear that we did not accept queer love,” he said at a public event held with rights groups. “The government wishes to apologise for that.”

The criminalisation of gay sex is widely believed to have contributed to homophobia in society at the time, which the government acknowledged in a separate statement.

“The law had a large symbolic value and meant that queer people were subjected to widespread condemnation, extensive discrimination, slander and blackmail,” it stated.

“Criminalising and prosecuting people for their love life, medically treating healthy people, depriving them of career and work opportunities are serious violations of our values.”

Annette Trettebergstuen, the country’s Culture and Equality Minister, condemned the law, which she said “destroyed many lives.”

Norway became the second country in the world to permit same-sex civil partnerships in 1993, which was followed by gay marriage gaining equal status to heterosexual unions in 2009.