The WA Government has formally apologised to the hundreds of people who were convicted under state laws that banned homosexual acts, describing it as active discrimination which ruined lives.

Key points: WA Premier apologises to men convicted for homosexual offences

WA Premier apologises to men convicted for homosexual offences New legislation to expunge convictions

New legislation to expunge convictions Homosexual acts decriminalised in WA in 1990

Premier Mark McGowan's apology came as the Labor Government introduced legislation that will allow people prosecuted over homosexual offences to apply to have their convictions expunged.

Mr McGowan described the apology, made on the floor of in State Parliament, as "long overdue", saying his Government was doing all it could to "right this wrong".

"On behalf of the Government of Western Australia, I am sorry for the hurt, for the prejudice, for the active discrimination that ruined lives," Mr McGowan said.

"For decades in Western Australia, unjust laws against homosexual acts were used to shame homosexual men, to deny their human rights, and to deny their humanity.

"I feel a sense of deep sadness that many victims of these unjust laws are not alive today to hear this apology."

In front of dozens of spectators in the public gallery, including people who had long campaigned for the convictions to be expunged, Mr McGowan said the laws had diminished society as a whole.

"These laws were State-sanctioned discrimination," he said.

"The uncomfortable truth is that they were also the foundation upon which much of current homophobia was built."

Liberal leader Mike Nahan also apologised to those who were convicted, saying homosexuality should never have been illegal.

"To those who today have criminal records simply for being in a loving and consensual relationship, we say sorry," he said.

Gay rights advocates Jon Mann and Gary Martin embrace after the apology from the WA Government. ( ABC News: Jacob Kagi )

Hundreds of people convicted for homosexuality

It is not known exactly how many individuals were convicted over the laws that outlawed homosexual acts, but the Government estimates between 200 and 300 people were affected.

Homosexuality was decriminalised in WA in 1990, but many people prosecuted under those laws have continued to live with the convictions on their records for decades since.

Advocates have long called for an apology and for the convictions to be expunged, saying those prosecuted have faced unjust travel restrictions and difficulty gaining employment for decades.

Campaigners embraced outside State Parliament after the apology, saying it had been a long time coming.

"These laws ruined peoples' lives, they created a cloud of fear and anxiety over peoples' heads," said Jon Mann, a spokesman from the lobby group Rainbow Rights.

"It made people think there was something wrong with them and today the Government has said 'no, there is nothing wrong with you'."

Rainbow Rights WA spokesman Jon Mann said the apology had been a long time coming. ( ABC News: Jacob Kagi )

Once the legislation has passed, people convicted with homosexual offences will have to apply to have the convictions expunged and satisfy the Department of Justice that the actions that led to their prosecution would not be a crime under today's laws.

Expunging a conviction means it is not only wiped from a person's criminal record, but treated as if it never happened.

In the case of people who have since died, partners and close family will be able to apply to have their convictions expunged.

With the support of the three major parties, the legislation should get through State Parliament within weeks.