Isle of Man Chief Minister Howard Quayle. (Isle of Man TV/ YouTube)

The chief minister of the Isle of Man has given a formal apology to gay people convicted for homosexual activity, before the law was changed in 1992.

The Isle of Man is a crown dependency, meaning that it maintains autonomy from the UK on issues like marriage.

It was the last part of the British Isles to legalise homosexuality via the Sexual Offences Act 1992, although the act still contained references to “unnatural offences”, “buggery” and “gross indecency” between two men.

The island legalised same-sex marriage in 2016.

Chief minister Howard Quayle gave the apology in the House of Keys, the lower house of the island’s parliament Tynwald, on January 28.

His speech marked the third reading of the Sexual Offences and Obscene Publications Bill 2019, which will wholly replace the Sexual Offences Act 1992.

The bill means that anyone historically convicted for homosexuality will be automatically pardoned, and all mentions of “unnatural offences” have been removed.

According to ITV, Quayle said: “It now seems incomprehensible… that there was a time when consensual sexual activity between men in the privacy of their own homes was seen as a criminal activity, warranting raids, searches and prosecution.

“And this was only in our recent history.

“Before that, many of our countrymen were convicted as criminals, simply for loving another adult.

“Many more lived in fear. Afraid to be honest about their identity to their friends, family and work colleagues. Forced to feel a sense of shame about who they were.

“We will never know the hurt our past laws may have inflicted on our own people. How many suffered; how many perhaps took their own lives and how many left their island never to return.”

Of the Sexual Offences and Obscene Publications Bill 2019, he added: “The Bill before us today tries to right this historic wrong. It gives an automatic pardon to men convicted of homosexual activity that would today be legal.”