Victoria's premier has apologised for "abominable" laws that turned thousands of gay men into criminals.
"I can't possibly explain why we made these laws and clung to them and fought for them," Mr Andrews told the Victorian parliament on Tuesday.
Homosexuality was decriminalised in Victoria in 1981.
Before then, men could be charged with homosexual acts, as well as the "thought crime" of loitering with homosexual intent.
"Those laws were struck here, where I stand," Mr Andrews said.
"For decades, we were obsessed with the private mysteries of men.
"And so we jailed them, we harmed them, and in turn they harmed themselves."
He apologised to men no longer alive who have their convictions "engraved upon their place in history".
Mr Andrews said the crime of "loitering with homosexual intent" effectively made being gay a thought crime.
"It has become clear to me the state also persecuted against homosexual thought," he said.
Opposition Leader Matthew Guy said gay men were physically tortured in Victoria as a result of the bigoted laws.
"The shock treatment, the frontal lobotomies, the incarceration at asylums, not to mention the physical beatings and ostracisation - this was all for the crime of being homosexual in Australia," Mr Guy told parliament.
Mr Guy said Brazil decriminalised homosexuality in 1830 and France in 1791, while it's never been a crime in heavily religious Poland.
"Our laws, passed in this very chamber, were wrong and did cause great hurt," he said.
Noel Tovey, who wrote a book about being an indigenous gay man and his treatment in jail, was in parliament to witness the apology.
"This is a really momentous day for me because I never thought I would live to see this day in Australia," the 84-year-old told reporters.
"I never thought I would actually get out of Pentridge (Prison) alive.
"Finally the government of Victoria is seeing us as real human beings."
Six men have successfully applied to have their criminal records expunged, with many others going through the process, after laws were changed in 2014.