A Palmdale man convicted of attacking two female joggers in the Antelope Valley has been sentenced to 23 years in state prison and ordered to register as a sex offender for the rest of his life.

Heriberto D. Romero, 34, was found guilty Aug. 3 of two counts of assault with intent to commit rape and one count each of attempted kidnapping to commit rape, false imprisonment by violence and dissuading a witness from testifying, according to the Los Angeles County District Attorney’s Office.

The charges against him stemmed from attacks on two young women last year, authorities said.

The first attack occurred Jan. 17, 2015, when Romero sneaked up behind a 20-year-old on an evening run at Pelona Vista Park, according to testimony during his trial. Romero struggled with the woman over her cell phone as she tried to call for help and ultimately succeeded in getting the phone away from her, according to Deputy District Attorney Scott A. Yang.

The attack stopped after the woman’s assailant saw or heard someone in the park, Deputy Ryan Rouzan of the Los Angeles County Sheriff’s Information Bureau said last year.

The second attack happened in the afternoon of Sept. 15, 2015 as a 24-year-old woman jogged along the California Aqueduct, the prosecutor said. Romero had been hiding in the bushes before he jumped out and attacked the victim, according to the testimony.

Rhe woman fought back against her assailant, who fled the location, Rouzan said last year.

Romero was arrested a week later by the sheriff’s department and has remained jailed since then.