Austria's parliament has approved legalising assisted suicide from January in response to a court ruling that the current ban violated fundamental rights.

A year ago, the constitutional court ordered the government to lift the existing ban on assisted dying, which is punishable by up to five years in prison.

According to the legislation approved by all parties except the far-right, adults who are terminally ill or suffer from a permanent, debilitating condition will be able to access help ending their own lives.

Two doctors will have to assess each case, one of whom will have to be qualified in palliative medicine.

Among their duties will be to determine whether the patient is capable of coming to the decision independently.

In addition, at least 12 weeks will have to pass before access is granted to make sure euthanasia is not being sought due to a temporary crisis.

This period will be shortened to two weeks for patients in the "terminal phase" of an illness.

The proposals were subject to scrutiny by experts before coming to parliament, where MPs had been expected to approve them.

The government has also allocated funds to further develop palliative care to ensure "no one chooses the path of death when there are other possibilities," said Justice Minister Alma Zadic, APA news agency reported.

If no new regulations were in place by the end of the year, the existing ban on assisted dying would have simply lapsed, leaving the practice unregulated.

Critics had slammed the 12-week cooling off period as too short, among other concerns voiced among others by the Catholic Church, which is against legalising assisted dying.

Elsewhere in Europe, assisted dying has been decriminalised in Belgium, Luxembourg, the Netherlands and Spain.