Patients who are terminally ill do not have a right to physician-assisted suicide, but their doctors can provide information and advise about medical aid in dying, a Massachusetts court has ruled.

Suffolk Superior Court Judge Mary K. Ames said in her Dec. 31 decision that the legality of physician-assisted suicide is not one for the courts to decide.

“The Legislature, not the court, is ideally positioned to weigh these arguments and determine whether, and if so, under what restrictions MAID (medical aid in dying) should be legally authorized,” Ames said in her ruling.

The ruling comes in a case filed by Dr. Roger Kligler, a retired physician from Cape Cod who has advanced prostate cancer, and Dr. Alan Steinbach, who treats terminally ill patients.

Patient rights groups welcomed Ames’ decision, saying that allowing any type of suicide is “too dangerous.”

“We are gratified the court reaffirmed the law against assisted suicide and referred the matter to the Legislature where lawmaking belongs,” John B. Kelly, director of Second Thoughts Massachusetts, a disability rights group, said in a statement Jan. 13. “Disability rights advocates will continue to press the Legislature that assisted suicide is just too dangerous.”

Matt Valliere, executive director of the Patients Rights Action Fund, said in a statement he sympathized with Kligler and other patients who face a challenging medical diagnosis, but “assisted suicide is simply too dangerous.”

He added that the terminally ill, people with disabilities, the elderly and financially disadvantaged people would be “at risk of abuse and coercion” if physician-assisted suicide was permitted.

Americans United for Life, based in Washington, joined the advocates in applauding the ruling Jan. 14.

“Every person, and especially the most vulnerable, deserves to be told the truth — that there is no healing or curative reason for medical suicide, and that there is always hope so long as there is life,” Tom Shakely, AUL’s chief engagement officer, said in a statement.

Compassion & Choices, an organization that advocates for better end-of-life care options, filed the lawsuit in 2016. It argued that patients should be able to end their lives with the aid of a physician in order to avoid needless suffering.

A spokesman for the organization said it planned to appeal Ames’ ruling.

In her decision, Ames wrote that while “this court has immense compassion for Dr. Kligler’s desire to avoid a potentially painful death and for Dr. Steinbach’s desire to ease his patients’ suffering,” it rejected the physicians’ arguments that medical aid in dying should not be considered manslaughter under Massachusetts law.

She determined, however, that physicians can share advice and information about medical aid in dying with their patients.