Canada's parliament has passed a contentious bill to allow medically-assisted death for terminally ill people.
The law was put forward after the Supreme Court struck down a ban on doctors helping the incurably sick to die.
The move makes Canada one of the few countries where doctors can legally help sick people die.
But critics say the new legislation is too restrictive.
They argue it will prevent people with degenerative conditions, such as multiple sclerosis, from seeking assisted suicide.
Government officials say the new law is a first step and can be expanded in the future.
The legislation had already passed by the House of Commons and Friday's Senate vote means it now only needs the formality of royal assent from the governor-general to become law.
Some senators were in favour of a much broader law but after weeks of political wrangling they gave in to pressure by Prime Minister Justin Trudeau's Liberal government, which had narrowed the scope of the bill.
In a statement, Canada's Justice Minister Jody Wilson-Raybould and Health Minister Jane Philpott said the bill struck "the right balance between personal autonomy for those seeking access to medically assisted dying and protecting the vulnerable".
Assisted suicide is currently legal in just a few countries, including Switzerland, the Netherlands, Albania, Colombia and Japan.
The practice is legal in some US states, including Washington, California, Oregon, Vermont and New Mexico.