02/11/2017 1:02 AM AEDT | Updated 02/11/2017 1:33 AM AEDT

Western Australia Premier Apologises For Gay Convictions

"I am sorry for the hurt, the prejudice, the active discrimination that ruined lives".

WA Premier Mark McGowan.

WA Premier Mark McGowan has formally apologised to West Australians who received criminal convictions in the past for homosexual acts and introduced legislation to get those records expunged.

Law-abiding gay West Australians should never have had criminal records for consensual acts no longer considered crimes, he told state parliament, following the rest of the states that have already acted similarly.

Mr McGowan said "I am sorry for the hurt, the prejudice, the active discrimination that that ruined lives".

"These laws were state-sanctioned discrimination and the uncomfortable truth is they were also the foundation upon which much current homophobia is built."

"Our LGBTI community has nothing to be ashamed of, the men affected were innocent of anything we would consider a crime today and their records should reflect their innocence."

He read out past newspaper headlines referring to gay people as "sinners" and "unnatural" and said people had even been jailed and whipped, which "diminished society and encouraged a culture of prejudice".

The apology was welcomed by the gay community, including Rainbow Rights group chairman Jonathon Mann, who said many people's lives had been ruined over the decades.

"Today the government has said no, there is nothing wrong with you ... it is ok to be gay," he told reporters.

Gay man Gary Martin attended the speech and said his partner, who died last year, was convicted and given electric shock therapy, where he was shown images of same-sex pornography and given a jolt of electricity in an attempt to cure him of his homosexuality.

"I want his name cleared, he was a well respected man and he didn't deserve it" Mr Martin said.

Gay man and author Peter Keogh described Perth as a hostile place for gay people in the 1960s and 1970s, where it was difficult to get a job, they were targeted by police and would meet in secret to socialise to avoid being threatened.

Attorney-General John Quigley, who introduced the legislation, said as a lawyer he had once represented a teacher who lost his job and his career was ruined after he was convicted for a homosexual act.

Homosexual acts were decriminalised under Carmen Lawrence's Labor government in 1990, but nearly three decades on WA had not expunged records for gay people.