LOS ANGELES — A man in the custody of Los Angeles police was critically wounded Saturday after being shot during a struggle with officers inside a hospital exam room.

The man had been arrested by gang officers on a felony charge and was at a police station when he "suffered a medical emergency," said Det. Meghan Aguilar, an LAPD spokeswoman. He was taken to White Memorial Medical Center in the Boyle Heights neighborhood.

While the man was in an examination room — adjacent to the hospital's emergency room — he began struggling with two officers, Aguilar said. At least one of the officers opened fire, striking the suspect.

"There was a medical examination that was about to take place and it occurred at that point," Aguilar said.

The man was transported to another hospital with a trauma center and remained in critical condition Saturday, she said. Police did not immediately release the man's name or additional details about his arrest.

Investigators were still working to determine the exact circumstances that led up to the shooting.

Detectives have started to interview witnesses, but the two officers have not yet been questioned, Aguilar said during a news conference outside the hospital.

The hospital remained open, but yellow crime scene tape blocked a portion of the street outside, which was lined with police cars.