Legislation to extinguish convictions for homosexual offences has passed in the New South Wales parliament.

The private member’s bill, introduced by Liberal Coogee MP Bruce Notley-Smith, seeks to address convictions from before 1984, when homosexuality was illegal in New South Wales.

According to the Guardian, it allows those convicted of consensual same-sex sexual activity to apply for it to be expunged.

Notley-Smith said the legislation is important because it will finally say “these people should never have been convicted – it was wrong”.

He added: “And to recognise the devastation it’s had on their lives, albeit very late in the day we can correct some of the wrongs of the past.

The bill was passed in the legislative assembly without amendments. Both major parties had expressed their support that morning.

The premier, Mike Baird, said in a statement: “This measure is long overdue and it recognises the hurt and anguish experienced by those who were convicted of consensual homosexual acts that are now no longer criminal offences.”

In May, New South Wales repealed a law which allowed murderers to get off with a lighter sentence if they claimed a gay victim ‘provoked’ them into the attack.