A 35-year-old man pleaded guilty Tuesday and was immediately sentenced to 23 years to life in prison for sexually assaulting a woman on a bus bench in Santa Ana and attacking another woman.

Erick Alvarez Hernandez pleaded guilty to forcible oral copulation, attempted forcible rape, assault with force likely to produce great bodily injury and forcible oral copulation, all felonies.

Hernandez has been in custody since Jan. 11, 2019.

A 52-year-old victim was waiting on a bus bench at MacArthur Boulevard and Bristol Street about 8:30 p.m. Jan. 5, 2019, when the defendant grabbed her from behind by the neck and pulled her into a secluded area, Deputy District Attorney Kristin Bracic said when Hernandez was charged.

Hernandez also punched her before forcing her to perform a sex act on him, Bracic said. Hernandez fled as a bus approached, Bracic said.

Hernandez also pleaded guilty to attacking another victim July 2, 2018.