By Holly Yan, CNN

For 27 years, Dr. James Heaps was trusted to treat UCLA students as an obstetrician-gynecologist.

Now he's charged with sexual battery, university officials said.

The doctor surrendered to law enforcement Monday, Chancellor Gene Block and Vice Chancellor of UCLA Health Sciences John Mazziotta said in a joint statement.

"We understand that these charges relate to care he provided to two patients in 2017 and 2018 at UCLA Health," the statement said.

The UCLA Health clinic is a separate facility from UCLA's student health center.

Heaps worked part-time at the student health center from around 1983 to 2010 and was hired by UCLA Health in 2014, the UCLA statement said.

In response to allegations against Heaps, UCLA investigated his conduct, removed him from clinical practice, told him he'd be fired and reported him to the state medical board and law enforcement, the statement said. Heaps then announced he'd retire.

University officials did not say how the cases came to light or provide details of the accusations.

Attorney says some gynecologists 'are frightened' now

Heaps' attorney Tracy Green said the allegations against Heaps are false.

She said medical assistants were present during the doctor's examinations with both of the accusers.

"UCLA never interviewed the medical assistants present or Dr. Heaps," Green said. "They didn't conduct further investigation, and now this has occurred. He is stunned. He was shocked that they rose to this level. "

Green said the sensitive nature of gynecology has some doctors worried about possible accusations.

"All exams are of an intimate nature," she said. "It is very frightening for physicians. "

UCLA says it 'can and must do better'

The university said it is trying prevent crimes like those alleged from happening again.

"We are deeply sorry that a former UCLA physician violated our policies and standards, our trust and the trust of his patients," the chancellor and vice chancellor wrote.

"Because we know we can and must do better, in March, we initiated an independent review of our institution's response to sexual misconduct in clinical settings. The review is examining UCLA's response to such conduct and whether our policies and procedures to prevent, identify and address sexual misconduct are consistent with best practices."

Other schools' doctors have been accused of sex crimes

UCLA's case is latest example of university doctors accused of sex crimes against patients.

-- Dr. George Tyndall, a former gynecologist at the University of Southern California, was accused of sexual abuse at the school's student health center.

More than 100 women have accused Tyndall of sexual misconduct. He was the only full-time gynecologist at the school's Student Health Clinic for 30 years.

Tyndall was fired by USC in 2017 for inappropriate behavior. University officials said the school reached a settlement with Tyndall but did not report him at the time to law enforcement or state medical authorities.

-- Dr. Richard Strauss was accused by 37 former Ohio State University students of sexual abuse.

Strauss died by suicide in 2005. The students sued the university last month, saying Strauss sexually assaulted and abused hundreds of male students, and that "OSU officials aided, abetted, and actively concealed Strauss' sexual predation" of students.

An OSU spokesman declined to comment on the lawsuit shortly after it was filed.

-- Dr. Larry Nassar, a former doctor for Michigan State University and USA Gymnastics, was sentenced last year to 40 to 175 years in prison after more than 150 women and girls said he sexually abused them over a decade.

Michigan State University violated federal law for years by failing to report crime statistics, including a series of sexual assaults committed by Nassar, a preliminary report by the US Department of Education found.

MSU said it was cooperating with the Education Department.

"The Nassar crimes caused so much pain to so many people," an MSU official said, "and we have more work to do to address those issues and support the survivors and our community."