A former gynecologist who worked with students at the University of California-Los Angeles for nearly 30 years pleaded not guilty to sexually abusing patients.

The school and prosecutors announced the charges against James Heaps on Monday, the same day he surrendered to law enforcement.

Heaps, 62, faces charges involving his conduct with two patients at UCLA Health in 2017 and 2018, UCLA said in a statement. He worked part-time at the student health center from 1983 to 2010 and had staff privileges at the school's medical center from 1988 until last year.

Authorities charged him with two counts of sexual battery and one count of sexual exploitation of a patient, said Ricardo Santiago of the Los Angeles County District Attorney’s Office.

'Betrayed our trust':USC pays $215 million to settle claims of sexual misconduct against staff gynecologist

'Unacceptable':New report details how USOC, USAG failed to protect athletes in Larry Nassar sex abuse

Last year, UCLA's rival school, the University of Southern California, faced two class-action lawsuits tied to how the school responded to complaints against gynecologist George Tyndall. USC agreed to pay $215 million to settle a class-action lawsuit after more than 500 current and former students made accusations, all of which Tyndall denied.

UCLA said it began investigating sexual misconduct allegations against Heaps last year, removed him from practice and moved to fire him, triggering his decision to retire. The school said it reported him to law enforcement and the state medical board.

“Sexual abuse in any form is unacceptable and represents an inexcusable breach of the physician-patient relationship,” Chancellor Gene Block and Vice Chancellor John Mazziotta said in a statement. “We are deeply sorry that a former UCLA physician violated our policies and standards, our trust and the trust of his patients.”

Heaps made $1.045 million from his job at UCLA in 2017, the latest year University of California pay data is available.

The school launched an independent review in March of how it responds to sexual misconduct in clinical settings.

Contributing: The Associated Press