A Manhattan judge ​has ​tossed a lawsuit by three terminally-ill New Yorkers and five doctors who wanted to overturn a law that makes assisted suicide a felony.

State civil judge Joan Kenney ruled that while she was sympathetic to the patients’ plight, the US Supreme Court has already found that New York state laws prohibiting assisted suicide are not a violation of civil rights.

The patient plaintiffs​ ​– including a 55-year-old former FedEx worker with AIDS, an 81-year-old retired attorney with bladder cancer and a 60-year-old philanthropist with Lou Gehrig’s disease — are appealing.

“We look forward to having the case reviewed by the Appellate Division,” said attorney Edwin Schallert. He represents clients Steve Goldenberg, the Fedex worker, Eric Seiff, the attorney, and Sara Myers, the philanthropist as well as doctors Howard Grossman, Samuel Klagsbrun, Timothy Quill, Judith Schwarz and Charles Thornton.

Attorney General Eric Schneiderman defended the case arguing against assisted suicide because of New York’s “longstanding commitment to the preservation of life,” he said. In her decision, released Monday, Judge Kenney quoted a 1997 ruling by former US Supreme Court Chief Justice William Rehnquist.

The 1997 ruling says that laws barring lethal medication do not “infringe on fundamental rights.”

But in a sympathetic nod to the terminally ill, Kenney wrote that it’s “baffling” how far the country’s courts have strayed from a 1891 ruling that allowed a Pacific Railway passenger named Clara Botsford to refuse to submit to a medical exam.

That 124-year-old decision, Union P.R. v. Botsford, reads, “No right is held more sacred, or is more carefully guarded by common law, than the right of every individual to the possession and control of his own person, free form all restraint or interference of others.”

Assisted suicide is legal in Montana, Washington New Mexico, Oregon and Vermont.