NEW YORK (AP) — While Joan Rivers lay sedated in a Manhattan clinic, her doctors performed unauthorized medical procedures, snapped a selfie with the comedian and failed to act as her vital signs deteriorated, according to a malpractice lawsuit filed Monday by her daughter, Melissa.

The 81-year-old comedian and star of “Fashion Police” on E! died Sept. 4, days after she went in for a routine endoscopy at Yorkville Endoscopy on Manhattan’s Upper East Side and stopped breathing.

The lawsuit filed in Manhattan State Supreme Court paints a picture of a careless, cocky staff of doctors who ran roughshod over Rivers while she was unconscious, and it suggests that she died because of their incompetence. The suit seeks unspecified damages.

Melissa Rivers said in a statement that filing the lawsuit was one of the most difficult decisions she had to make.

“What ultimately guided me was my unwavering belief that no family should ever have to go through what my mother, Cooper and I have been through,” she said, referring to her son. “The level of medical mismanagement, incompetency, disrespect and outrageous behavior is shocking and frankly, almost incomprehensible.”

She said her mother deserved better.

The city’s medical examiner found that Joan Rivers died of brain damage due to lack of oxygen after she stopped breathing during the endoscopy. Her death was classified as a therapeutic complication. The classification is not commonly used; more deaths are certified as accidents, homicides, suicides or natural causes. Negligence was not suspected. Had it been, it would have been listed as a contributing cause.

But the lawsuit alleges that the doctors mishandled the endoscopy and performed another medical procedure called a laryngoscopy on Rivers’ vocal cords without consent. When the anesthesiologist expressed concern over what the procedure would do to Rivers’ ability to breathe, she was told she was being “paranoid” by the gastroenterologist performing the endoscopy, Dr. Lawrence Cohen, the suit said. He has since resigned from the clinic.

Rivers’ private ear, nose and throat specialist, Gwen Korovin, was introduced as an observer in the operating room but instead performed two procedures though she wasn’t cleared to work at the clinic, the lawsuit said. Rivers crashed during the second — after Cohen snapped pictures of Rivers, and with Korovin, saying later he thought Rivers would want to see them, the suit said. Korovin then left the operating room to avoid being caught, according to the suit.

A message seeking comment that was left with the clinic’s manager was not immediately returned, nor were messages left with Korovin’s attorney. Calls to her office and Cohen’s office and home rang unanswered.

“To put it mildly, we are not just disappointed by the acts and omissions leading to the death of Joan Rivers, but we are outraged by the lack of care and concern for Ms. Rivers on the part of her treating physicians and the endoscopy center where the treatment was rendered,” said Melissa Rivers’ attorneys, Jeffrey Bloom and Ben Rubinowitz.

A federal investigation, ordered by the federal Centers for Medicare and Medicaid Services, found the Yorkville Endoscopy clinic made several errors, including failing to keep proper medication records and snapping the cellphone photos. It also found the clinic failed to get informed consent for every procedure performed and failed to record Rivers’ weight before the administration of sedation medication.

The clinic submitted a lengthy plan for fixes, but the changes weren’t good enough and the federal agency said it would revoke accreditation unless the clinic was in better compliance by March 2.