DENVER (AP) — After watching his mother die slowly when he stopped her medication, Neil Mahoney knew he wanted the option of ending his own life peacefully when a doctor told him in July that he had months to live after being diagnosed with cancer.

A physician was willing to help him do that under Colorado's medically assisted suicide law, but she was fired by Centura Health, a Christian-affiliated health system, for violating its guidelines on the issue.

The action launched a legal fight over whether the law violates the organization's freedom of religion and left Mahoney, 64, spending his limited time and energy seeking another doctor to prescribe the life-ending drugs.

"At points it just gets so overwhelming," said Mahoney, who is also working to settle up his taxes and figuring out what to do with his 401(k). An end-of-life celebration is one possibility for some of the money the former facility manager for a plant distributor saved for retirement.

Colorado is one of nine states that will allow terminally ill patients to seek life-ending drugs by the end of the year.

Colorado's law, passed by voters in 2016, allows people with a prognosis of six months or less to live to request the drugs from their doctor and take when they choose.

Doctors can decide whether to help or not under the law. It provides one specific exemption for hospitals — barring doctors from prescribing drugs to be administered on its premises. The law also says that health care providers cannot retaliate against a doctor for providing or refusing to help a patient obtain the drugs.

Centura Health is one of two religiously affiliated health systems in Colorado that has said it was opting out of the law because of its Christian beliefs, leaving the ability of its doctors to participate unsettled. Advocates of the law have expected a court challenge.

Dr. Barbara Morris, a Centura Health primary care and geriatric physician with 40 years of medical experience, said she told Mahoney she couldn't help him because of Centura's policy.

She looked into referring him to a doctor affiliated with another hospital, but he would have had to repeat tests as part of a re-diagnosis, which he said he did not want to do.

Morris was fired Aug. 26, just days after she and Mahoney asked a state court to declare that she could not be sanctioned for helping him seek life-ending drugs. She has been unable to care for Mahoney and about 400 other patients, many of them frail and facing their own end-of-life issues.

"To be forced to abandon patients has just been intolerable for me," Morris said.

Last week, Centura, a non-profit corporation with board members appointed by AdventHealth and CommonSpirit Health, had the case moved to federal court, where it is challenging whether Colorado's law violates its religious freedom and its right to discipline employees on religious grounds.

It says directives drawn up by the U.S. Conference of Catholic Bishops forbid hospitals from participating in euthanasia or assisted suicide.

"We believe the freedom of religion doctrine at the heart of the U.S. Constitution's First Amendment supports our policies and is the right of every American," Centura said in a statement that also expressed sympathy for Mahoney. It said it will ask the court to declare that Colorado law cannot interfere with a religious organization carrying out its mission and ministry.

Jason Spitalnick, one of the lawyers representing Mahoney and Morris, pointed out that that the law says helping a patient get life-ending drugs does not constitute euthanasia or assisted suicide under the state's criminal code.

The law also requires the cause of death of those taking the drugs to be listed as their terminal illness, not suicide. Advocates object to the term suicide because they say people with terminal conditions would not want to die otherwise and are just seeking a way to have a less horrific death.

Mahoney thinks hospitals — motivated by money — have gone too far in trying to keep people alive.

He has undergone chemotherapy intended to extend his life but will not learn until next month how effective it has been. He said he eats about a quarter of a meal each day and cannot exercise.

He is expected to eventually have trouble breathing and lose his ability to control his bowels and bladder. Mahoney does not have children and does not want his siblings to have to take care of him.

"Just because they're blood, doesn't mean they have to suffer and go through all of this," he said.

Copyright 2019 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.