Irish Minister for Justice Charlie Flanagan read an apology to the entire LGBT community for the country previously outlawing homosexuality, reports Raidió Teilifís Éireann.

"I extend a sincere apology to all of those people, to their family, and to their friends," Flanagan told Irish senators on Tuesday. "To any person who felt the hurt and isolation created by those laws, and particularly to those who were criminally convicted by the existence of such laws."

The speech marked the 25th year since homosexuality was decriminalized in the nation, which passed marriage equality in 2015. The law, which dates back centuries, notably led to the imprisonment of gay writer Oscar Wilde.

"While the state's laws affected gay men in a legal sense, they had a chilling effect on lesbians as well," said out Prime Minister Leo Varadkar. "What we can say is that we have learned as a society from their suffering. Their stories have helped change us for the better; they have made us more tolerant, more understanding and more human."

The prime minister was supportive of a motion from Labour Senator Ged Nash, which offered a formal apology to men convicted by the courts before 1993, the year homosexuality was decriminalized. All parties supported it.

"Today the people I want to pay a special tribute to are the unknown heroes, the thousands of people whose names we do not know, who were criminalized by our forebears," Varadkar said during a debate over the motion.

They also paid tribute to Senator David Norris, who fought to repeal antigay laws since 1977. Norris, now 73, was the first openly gay person elected to public office in Ireland.

"The impact and significance of that challenge cannot be underestimated," said Minister Flanagan, "This was a brave, first step towards the decriminalization of homosexual relationships, and is one which is widely recognized as the critical step that led to the 1993 Act."

More than 700 are expected to celebrate at Dublin Castle next weekend to mark the 25th anniversary of the decriminalization.