An illegal immigrant accused of attempted rape and murder during a violent crime spree Monday was released by Ohio sheriff’s deputies three weeks ago after U.S. Customs and Border Protection agents told the officers not to detain him.

Juan Emmanuel Razo-Ramirez, an illegal immigrant from Mexico, was arrested after a shootout with police in Lake County, Ohio, that capped off a string of crimes beginning with an attempt to rape his niece, a 14-year-old girl. He then shot a woman in the arm and later murdered a 60-year-old woman in her home.

Lake County sheriff’s deputies questioned Razo-Ramirez July 7 after they found him “acting suspiciously” by a residential area where he told officers he was in the U.S. illegally, the Los Angeles Times reports.

The deputies contacted Border Patrol agents, but the officials decided not to take Razo-Ramirez into custody.

“During that interview, Razo was uncooperative and the agents were unable to determine his immigration status. Without such a determination, the agents had no legal basis to file a detainer to hold the subject,” the Department of Homeland Security said in a statement.

“Although the agents offered to meet with the deputies on site and interview the subject in person, the offer was declined and the subject was released.”

Lake County Sheriff Daniel Dunlap said Razo-Ramirez did not have a prior criminal record, and though he previously admitted he was in the U.S. illegally, he denied the charge when speaking to Homeland Security officials.

Dunlap said because of this they decided to release him rather than waiting for immigration officials to question him in person.

“I have somebody who we don’t know who he is, why he is in this country, why he is here illegally and why he allegedly committed a murder,” Painesville Municipal Court Judge Michael Cicconetti said during Tuesday’s arraignment. “He’s here illegally? And they didn’t take him? … I can’t set a bond high enough.”

The judge set his bond at $10 million. Razo-Ramirez pleaded not guilty to attempted murder, and more charges will likely be filed, according to the Los Angeles Times. The Department of Homeland Security said it would pursue deportation after the trial.

The case comes nearly a month after an undocumented immigrant fatally shot 32-year-old Kate Steinle while she was walking with her father on a public pier in San Francisco.

Juan Francisco Lopez-Sanchez, the man charged with Steinle’s murder, is a seven-time felon who was deported to Mexico five separate times. He was released from a San Francisco jail in April under “sanctuary city” protections barring the jail’s deputies from notifying U.S. Immigrations and Customs Enforcement of his release, despite the agency’s prior request.

The case pushed sanctuary cities into national prominence, reigniting a contentious immigration debate on Capitol Hill.