(CNN) Abortion will be legalized in Queensland, after lawmakers in the Australian state overturned 19th-century legislation banning the procedure.

The Legislative Assembly voted 50-41 to make termination available on request up to the 22nd week of pregnancy.

The bill also creates "safe access zones" of 150 meters around abortion clinics to protect women from harassment by anti-abortion campaigners.

Terminating a pregnancy has been illegal in Queensland since 1899, punishable by up to seven years in prison and classified as an "offence against morality" in its criminal code.

But Wednesday's ruling marks a long-awaited victory for abortion-rights activists there, and the changes could come into effect later this year.

Read More