A Mexican immigrant might avoid deportation after sexual assault charges were dismissed in a plea agreement announced Thursday in Rock County Court.

Jorge Mendoza-Arellano, 44, of 1944 Garden Drive, Janesville, was charged more than a year ago with third-degree sexual assault, exposing a child to pornography and exposing genitals to a child.

While his case was pending, Mendoza-Arellano violated the terms of his bond by being in contact with children because he was living in his mother’s residence, where she cared for children, so he was charged with felony bail jumping.

The prosecution’s case on the sex assault was weakened when it was revealed a police officer who read Mendoza-Arellano his Miranda rights in Spanish did so incorrectly, so a confession might have been suppressed, said Assistant District Attorney Scott Dirks.

Dirks said dismissing the sex assault charges also allowed the victim, a 17-year-old boy Mendoza-Arellano knew, to avoid testifying at trial.

As part of the agreement, Mendoza-Arellano pleaded guilty to the bail jumping charge, and the defense and prosecution recommended he get the maximum sentence: three years in prison and three years of extended supervision.

Judge Karl Hanson agreed and ordered Mendoza-Arellano into custody immediately after imposing sentence.

Defense attorney Fawn Moses said after the hearing that immigration attorneys said her client had a low chance of being deported after the bail-jumping conviction, but the sexual-assault charges likely would have led to deportation.

“Frankly, I hope he gets deported,” Dirks told the court, adding later in the hearing: “He needs to be away from children. He needs to stay away from the victim in this matter, especially.”

Mendoza-Arellano came to this country from his native Mexico when he was 18 or 19, Moses said. He has been a legal resident with a green card for about 10 years.

He was convicted in 1996 of second-degree sexual assault of a child after he and a 16-year-old girl had a sexual relationship, Moses said.

He has always complied with sex offender rules, Moses said, and he has worked, mostly in factories, all his life and paid his taxes.

He married and has a 20-year-old son. His wife divorced him after he was charged in this case, Moses said.

Hanson told Mendoza-Arellano that he hopes the victim will find the strength to overcome the damage done.

Hanson warned him that during his three years of supervision, he will be under strict rules that come with being a sex offender, and any new crime could send him back to prison.