ELIZABETH — A man with a long history of sexual offenses against children has been sentenced to 20 years in prison after sexually assaulting a 10-year-old school girl he grabbed off a city street.

The now-13-year-old girl and her mother on Wednesday attended the sentencing of Jair Ramirez, 43, who heard how his broad-daylight rape attempt in 2016 continues to scar his victim. Prosecutors said the girl spent months in therapy and remains fearful of walking in public.

“She (the victim) was afraid that something even worse was going to happen to her … and didn’t know if she would ever see (her mother) again,” Union County Assistant Prosecutor Caroline Lawlor said.

The girl was walking to school on Orchard Street — a neighborhood that her mother thought was safe enough to allow her to walk alone — when Ramirez approached her with his genitals exposed. Ramirez then dragged her into an alley.

The girl was saved by a city school teacher who lives in the neighborhood and who had gone outside to move her car. The woman noticed the attack and began screaming. The man stopped and threatened the woman before he fled, officials said.

“We’re lucky that she was there,” Lawlor said.

At the time of his arrest, Ramirez also had been wanted on charges of threatening a 15-year-old girl at gun point weeks earlier in the city.

Ramirez was convicted by a jury in February of second-degree sexual assault, second-degree luring, third-degree child endangerment and fourth-degree lewdness.

A judge ordered him to register as a sex offender under Megan’s Law. He will be subject to parole supervision for life.

In 2002, Ramirez escaped from a Hartford, Connecticut prison where he was being held during a trial on charges that he broke into a home and raped a little girl at knifepoint in her bedroom. The girl's father awoke to the girl's cries and scared off Ramirez, authorities said. Ramirez was caught in New Jersey.

In New Jersey, he was accused of sexually assaulting a child younger than 13 but pleaded guilty to fourth-degree lewdness in 2012 and served about 200 days in jail and three years of probation.

In 1997, he was sentenced to two years of probation after serving 91 days in jail on a burglary charge.

Sergio Bichao is deputy digital editor at New Jersey 101.5. Send him news tips: Call 609-359-5348 or email sergio.bichao@townsquaremedia.com.

Sign up for the NJ1015.com Newsletter

Get the best of NJ1015.com delivered to your inbox every day.