Abortion will be decriminalised in Queensland after two days of emotional parliamentary debate and decades of campaigning by reproductive rights advocates.
On Wednesday night, 50 MPs voted for the legislation, which was introduced by the Labor government, and 41 MPs voted against it.
The debate ran for two days and involved personal testimony from dozens of politicians.
A termination was only lawful to "prevent serious danger to the woman's physical or mental health", but now abortion will be available up to 22 weeks gestation, after which the patient would require two separate doctors to approve the procedure.
The legislation introduces 150m safe-access zones around clinics to protect patients from harassment and intimidation by protestors.
Under the new legislation, which comes into effect later this year, doctors who conscientiously object to abortion will be required to refer a patient seeking an abortion to a doctor who does not oppose abortion.