When she was still relatively healthy, a 74-year-old Dutch dementia patient made her medical wishes clear: If her condition were to deteriorate, she would like to die.

Because she was Dutch, that was possible. The Netherlands legalized medical euthanasia in 2002.

In 2016, four years after the woman’s Alzheimer’s disease was diagnosed, a doctor helped her end her life — touching off a legal and ethical storm in the Netherlands that led to the doctor being criminally prosecuted.

On Wednesday, the doctor was found not guilty in the landmark case that illuminated the many ethically complicated questions surrounding voluntary euthanasia and medically assisted dying, as more countries debate introducing laws that would allow doctors to help certain patients choose to die.

The case had been the first instance of a doctor being accused of legal wrongdoing in a patient’s death by euthanasia in the Netherlands. Prosecutors had charged that the doctor did not appropriately consult with the patient before euthanizing her, even though the patient’s daughter insisted that the doctor had freed the woman from “mental prison” by helping her die. Both the doctor and the patient were unnamed in the case.

On Wednesday, about three years after the patient died, the Hague District court determined that the doctor did not break any laws and had acted in response to the patient’s personal request earlier in her illness.

Judge Mariette Renckens said the doctor “did not need to verify the current desire for euthanasia” because the patient’s wishes were so clearly stated in her living will, Reuters reported.

Thousands of people were voluntarily euthanized in the Netherlands last year. It is one of only a handful of countries where the procedure is legal. But only a tiny fraction of euthanized Dutch patients in 2018 had advanced dementia at their time of death, according to the Guardian.

“A crucial question to this case is how long a doctor should continue consulting a patient with dementia, if the patient in an earlier stage already requested euthanasia,” Sanna van der Harg, a spokesperson for the prosecutors, told the BBC.

She said the prosecutors “do not doubt the doctor’s honest intentions” but said they believed the patient could have been more involved in conversations about terminating her life.

But the judge ultimately ruled that the patient would not have been “coherent” enough to make that decision at the time of her death.

In other countries where medical euthanasia or physician-assisted dying is legal, similar debates have emerged about whether children or older patients who are no longer lucid can opt to die. Belgium did away with age restrictions in 2014, 12 years after the country legalized medical euthanasia. Between 2016 and 2017, three terminally ill minors, ages 9, 11 and 17, were euthanized there.

In 2015, Canada’s Supreme Court ruled in favor of physician-assisted death for patients with “grievous and irremediable” illnesses. But Canadian lawmakers then voted to require patients seeking life-ending drugs to be mentally capable of consenting to follow through with it just before they die.

According to the Alzheimer’s Association of Canada, those with advanced dementia would not qualify for medically assisted dying because patients’ “wishes, values and beliefs may change, skills are lost and the ability to make decisions is often greatly reduced."

In 2018, Audrey Parker, a Canadian patient with advanced breast cancer, decided she wanted to die. But, as The Washington Post reported at the time, she also wanted to experience one last Christmas, leaving her in a conundrum. If she lived through Dec. 25 that year, she feared the drugs she was taking would alter her mental ability to consent to death. She was lethally injected on Nov. 1 that year instead.

Patients should be allowed to “figure out when the right time to die is,” she wrote in a Facebook post the day she died.

Read more:

Scottish court rules Boris Johnson illegally suspended Parliament and misled the queen

Europeans once hoped the British would reverse Brexit. Now, many can’t wait for them to leave.

‘Is the Prime Minister a criminal?’ projected onto British Parliament