Media playback is unsupported on your device Media caption The New South Wales abortion ruling is a milestone for the state, says premier Gladys Berejiklian
Abortion has been decriminalised across Australia after the last remaining state where it was illegal, New South Wales (NSW), voted to reform its laws.
The bill, passed on Thursday, overturns a 119-year-old law which had been criticised by opponents as archaic.
The legislation had generated weeks of heated debate and deeply divided the state's conservative government.
Previously, abortions were possible in NSW only if a doctor deemed there was "serious risk" to a woman's health.
The legislation was passed 26-14 in the state's lower house after discussions about more than 100 possible amendments. It has already been approved by the upper house.
The law makes it legal for terminations to be conducted up to 22 weeks into a woman's pregnancy - or later if two doctors agree.
Image copyright EPA Image caption The debate over the bill prompted protests on both sides
The reform had been strongly opposed by some activists and MPs who raised objections due to their personal beliefs, as well as concerns about late-term abortions.
But last-minute amendments ultimately persuaded some conservative MPs, and the bill drew support from other parties.
"The current law has meant women and doctors have a threat of 10 years in jail for making this decision and that's not okay," said Labor MP Penny Sharpe, one of the bill's co-sponsors.
"This is a massive step forward for women in this state."
You might also be interested in:
Yesterday, the  of New South Wales (NSW), Australia voted to pass the "Reproductive Health Care Reform Bill 2019" which decriminalized abortion.  Until the new legislation, NSW had the most restrictive anti-abortion law in Australia.  The NSW legislature in Sydney abolished any existing  rules about abortion and legalized terminations up to week 22 of a pregnancy.
marriage equality in 2017 
Since 1900, under the state's criminal code, abortions were only allowed if a doctor determined the mother was in danger, either mentally or physically. The bill was drafted by  who said on the parliament floor, "It follows decades of work from women's rights campaigners, activists and people in the Parliament". The upper house debate involved 102 amendments, and was amongst the longest they have ever debated a bill.

Member of parliament (MP)  said a law allowing the termination of a life marked a "sad day for NSW". Former prime minister Tony Abbott said, "It is a license for sex-selection abortions. It is a license for late-term abortion ... It is effectively infanticide on demand." 

MP , who co-sponsored the bill, said, "The current law has meant women and doctors have a threat of 10 years in jail for making this decision and that's not okay". Early opponent MP  said, "We have moved the bill to a better place".

Premier  was not present at the bill's final vote.

New South Wales is the most populated Australian state. The state of South Australia still limits abortions to cases with two doctors' approval.