CLEVELAND (Reuters) - A Mexican national living illegally in the United States has pleaded guilty to murdering and raping a woman during a July crime spree in order to avoid a possible death sentence, Ohio prosecutors said on Tuesday.

Juan Razo, 36, pleaded guilty on Monday to 16 criminal counts connected to a July 27 rampage that began when he attempted to rape his 14-year-old niece, who fought him off, and went on to rape and murder 60-year-old Margaret Kostelnik, who lived nearby, after breaking into her home, police said.

He fled the home and went on to shoot and wound a woman walking with her two children and later shot at county sheriff’s deputies while they were trying to arrest him, police said.

He pleaded guilty to counts including aggravated murder, attempted murder, rape, attempted rape and kidnapping, Lake County Prosecutor Charles Coulson said.

Lake County Sheriff Daniel Dunlap said deputies first encountered Razo on July 7 and alerted federal authorities that he was in the country illegally, but no order to detain him for immigration purposes was issued and Razo was released, Dunlap said.

Razo is scheduled to be sentenced next month and faces a maximum term of life in prison without parole plus 107 years, Coulson said, adding, “He will die in an American prison.”

Razo’s plea comes at a time when Republican presidential front-runner Donald Trump has accused Mexico of sending rapists to the United States and vowed to build a wall along the U.S.-Mexico border and to deport the estimated 11 million illegal immigrants already in the country if elected.

Two Boston brothers in August attacked a homeless Mexican man they found sleeping at a subway station, and told police “Donald Trump was right, all these illegals need to be deported.” The pair have since been charged with hate crimes.