Victoria is on track to become the first jurisdiction in Australia to allow euthanasia.

Victoria’s lower house of parliament has passed assisted dying legislation after more than 24 hours of debate over four days.

The bill is now on its way to the upper house.

Politicians debated each of the 141 clauses of the bill, proposing more than 300 amendments, all of which failed.

The bill eventually went to a conscience vote, which passed 47 votes to 37.

The laws would allow a patients over the age of 18 to access drugs to take their own life if they are terminally ill and are given just 12 months to live.

The illness must be “causing suffering that cannot be relieved in a manner that is tolerable to the person”.

The legislation was developed following a parliamentary inquiry that recommended the introduction of assisted dying laws.

Former Australian Medical Association president Prof Brian Owler led a ministerial taskforce that worked out how the law would operate.

The bill contains 68 safeguards and includes severe penalties for misuse of the scheme, including life sentences for doctors found to have coerced or encouraged a patient to consider voluntary assisted dying.

The four-day debate heard concerns from opponents that the laws could be abused by rogue doctors, did not do enough to protect vulnerable people from coercion, and that there needed to be more detail on the lethal medication used.

The Victorian coroner says at least one person takes their own life each week in Victoria due to unbearable pain and suffering from chronic and incurable conditions.

The former prime minister Paul Keating has become one of the high-profile opponents.

Mr Keating said the vote was a “truly sad moment for the whole country”, and called on the upper house to “beat this deeply regressive legislation”.

“What this means is that the civic guidance provided by the state, in our second largest state, is voided when it comes to the protection of our most valuable asset,” Mr Keating said in a statement on Friday.

“To do or to cause to abrogate the core human instinct to survive and live, for the spirit to hang on against physical deprivations, is to turn one’s back on the compulsion built into the hundreds of thousands of years of our evolution.”