Sergio Jose Martinez, 31, is charged in the knife-point rape of two women in Portland

An illegal immigrant with a long history of deportations to Mexico, and who was released by local jail officials in defiance of a federal immigration hold, is now accused of raping one woman and assaulting another in a sickening crime spree.

Sergio Jose Martinez, 31, is charged with 13 counts - including burglary, kidnapping, sodomy and sex abuse - in the knife-point attacks on two women in Portland on Monday.

Six months ago, on December 7, jail officials in Portland had Martinez in custody when they received a request from the Immigration and Customs Enforcement agency, asking the jail to notify ICE before his release.

Yet the local officials released him the next day in defiance of the federal immigration detainer, an agency spokeswoman told the Oregonian.

Oregon has a state law forbidding local law enforcement from using any resources to enforce federal immigration law.

Martinez is seen at his Wednesday arraignment. Jail officials in Portland were forced to deny an ICE detainer against Martinez in December, because of Oregon's 'sanctuary state' law

Police say Martinez broke into a home on this quiet residential street, bound a 65-year-old woman, and raped her before stealing her car

The criminal spree on Monday began around 7pm, when a suspect broke through an open window into a 65-year-old woman’s home, on NE Halsey street in the Sullivan's Gulch neighborhood.

The suspect, who police say was Martinez, used scarves and socks from her closet to bind and gag the woman before sexually assaulting her, according to court documents reported by Fox12.

Martinez slammed the elderly woman's head into the wooden floor, punched her, and stole her phone, credit cars, and car, speeding away in it, according to police.

The woman was able to get to a neighbor's home and call 911.

Just hours later, police say Martinez had made his way to a parking garage, where he crouched in a dark corner until he spotted a woman.

He approached the woman saying he wanted to 'talk', but then produced a knife and forced the woman to walk towards her car, according to police.

Martinez is accused of assaulting a second woman in this parking garage, where he allegedly crouched in a dark corner and then forced her into her car with a knife

The woman offered him her money, phone and laptop to leave her alone, but when he persisted in the assault, she kicked him in the stomach, cops say.

'You shouldn’t have done that,' Martinez said, as the woman hit the panic button on her car in a last ditch attempt to find help, according to a police affidavit.

As the assault unfolded, people nearby heard her screams and ran to her aid, and the suspect fled.

Police arrested Martinez nearby carrying a six-inch knife.

Prior to booking, he had to undergo treatment for meth psychosis, and admitted to using meth and heroin, police said.

Martinez is believed to be a transient who has been in Portland for the last three years, between deportations, and who picks up construction work for money.

Martinez (left) is seen in court wearing an anti-suicide jail garment that cannot be made into a noose. Prior to booking, he had to undergo treatment for meth psychosis

Earlier this year, he told jail staff that he drinks four to six 24 oz 'tall boy' beers every day day. In the past, he said he has consumed as many as 10 beers per day, according to KOIN.

His extensive criminal history includes convictions for burglary, battery, theft, parole violations, and illegal entry into the US.

He has been deported from the US more at least 20 times, most recently in November of 2016.

One month later, he was back in Portland - in Multnomah County Jail, where state laws forced his jailers to turn him loose without handing him over to ICE.

He is now charged with two counts of unauthorized use of a motor vehicle, two counts of second-degree assault, one count of kidnapping, two counts of burglary, two counts of robbery, three counts of first-degree sexual abuse, and one count of first-degree sodomy.

Bail has been set at $2.36million in the case.