A San Diego physician avoided jail despite admitting to raping and photographing unconscious patients at a low-income health clinic.

Dr. Jeffrey Joel Abrams pleaded guilty in June to eight counts of sexual penetration of an unconscious person, three counts of sexual battery and one count of possession of child pornography, reported the Times of San Diego.

The 68-year-old Abrams, who was barred from ever practicing medicine again, was sentenced to 25 years and eight months in prison.

ADVERTISEMENT

But Judge Laura Halgren suspended the entire term and ordered the doctor to serve one year of house arrest instead.

Prosecutors said they agreed to accept the plea deal, in part, because Abrams is suffering from kidney cancer and other health problems, and also to avoid requiring victims to testify in court.

Investigators said Abrams conducted “unnecessary and inappropriate” vaginal exams on patients at Volunteers in Medicine, and he told women he needed cell phone photographs of their genitals for teaching purposes.

However, none of those photos — which potentially involved thousands of patients — were found in the patients’ medical records.

The charges are related to incidents involving 12 victims, including an 8-year-old girl, between June 2010 and June 2014.

ADVERTISEMENT

One of the patients alerted authorities after she said Abrams touched her genitals and took photos early last year.

Abrams must register as a sex offender and will serve five years on probation after his house arrest ends.

Several victims have filed a civil lawsuit against the physician.

ADVERTISEMENT

Watch this video report posted online by KGTV-TV: