Abortion will become legal in Queensland, after the state’s parliament voted in support of new legislation.

Termination of pregnancy had been classed as an “offence against morality” under a 119-year-old section of the criminal code.

Under the new changes, abortion will become legal until 22 weeks gestation, and thereafter with the approval of two doctors.

Safe access zones will be established to restrict protesters from coming within 150 metres of abortion clinics.

Doctors will be allowed to refuse to treat a woman on moral grounds, but will be legally required to refer her to another medical practitioner if they do so.

Counselling service Children by Choice welcomed the change.

“Children by Choice has been fighting for this important reform to cruel and archaic laws since 1972 and we are so proud of all of the people who have advocated on behalf of Queenslanders who couldn’t advocate for themselves,” Children by Choice manager Daile Kelleher said.

“The reality is that nearly one in three Australian women will have an abortion in their lifetime. Criminalising reproductive healthcare creates barriers for what is a simple medical procedure and makes it harder to access and afford, and has led some people to make life-threatening decisions.

“We thank the 50 Queensland MPs who voted for this bill. You listened to the vast majority of your constituents who supported this bill and your vote will mean truly better health outcomes for all Queensland women.”

The state’s LNP allowed a conscience vote on the motion, leading some to side with the Labor Government,

Conservatives and anti-abortion groups say those MPs who supported the laws will be targeted at the next state election.