(CNN)Abortion has now been decriminalized in almost all of Australia after the country's most populous state voted to overturn a 119-year-old law.
On Thursday, lawmakers in New South Wales -- which is home to Sydney -- voted to pass a bill that decriminalizes abortion and makes terminations available to people who are less than 22 weeks pregnant.
Previously, "unlawful abortion" was listed in the Crimes Act and carried a possible penalty of 10 years in prison for a woman who administered her own abortion. To get a "lawful abortion," a doctor needed to agree that a woman's physical or mental health was in serious danger if she continued the pregnancy.
Under the new law, women will be able to get abortions up to 22 weeks into their pregnancy without having to prove that their mental or physical health will be impacted if they continue the pregnancy. After 22 weeks, they will need two specialist medical practitioners to sign off on the abortion.
New South Wales' move means that abortion is now decriminalized everywhere in Australia -- apart from the state of South Australia. South Australia's abortion laws are currently under review.
"And there you go folks Abortion has finally been decriminalised everywhere in Australia .... oh yeah except here in South Australia!" tweeted South Australia Abortion Action Coalition on Thursday. "Congratulations NSW now let's get this done here."
New South Wales' law change was controversial and provoked heated debate. Religious groups, anti-abortion activists and MPs had raised concerns, including about late-term abortion and people using abortions to select the sex of their child.
But on Thursday, the bill passed through the house to applause, CNN affiliate SBS reported.
"For feminists across New South Wales, we have finally achieved a historic milestone for this State," Labor Party MP Jo Haylen said as the bill was read on Thursday. "Women in New South Wales will no longer fear prosecution or imprisonment when they make decisions about their lives and their bodies."
"This is 119 years overdue."
Greens MP Jenny Leong said she did not know whether to express her outrage over it taking so long, or her "overwhelming joy and happiness and sense of celebration that we are on the cusp of something huge."
Following the decision, Family Planing New South Wales tweeted: "women will now have autonomy over their bodies and healthcare."
But not everyone will be happy with the result. Former Prime Minister Tony Abbott was a vocal opponent of the bill. The Catholic Archbishop of Sydney Anthony Fisher said the legislation "may be the worst law passed in New South Wales in modern times."
"The new abortion law is a defeat for humanity," he said, according to state broadcaster ABC.
In neighboring New Zealand, a similar bill to decriminalize abortion is currently going through parliament.