A judge allowed a man convicted of raping a woman when she was 12 years old to have joint custody of her child, despite being convicted of raping another child in a separate incident.

Christopher Mirasalo, 27, of Brown City, Michigan, raped the woman, who became pregnant as a result of the crime, nine years ago when he was 18 years old, KCCI reported.

A judge awarded Mirasalo joint legal custody of the child and parenting time after a paternity test confirmed that he was the father of the child.

Mirasalo, who was convicted of sexual assault for the first woman in 2008, also served a four-year prison sentence for sexually assaulting another child.

The now 21-year-old victim is trying to legally block Mirasalo’s access to her child under the Rape Survival Child Custody Act, the Detroit News reported.

The victim’s attorney argued Mirasalo forcibly raped and terrorized her client with death threats in September 2008.

Athough Mirasalo was charged with felony first-degree rape, a judge granted him a plea deal where he could plead guilty for a charge of attempted rape, which carries a maximum penalty of five years behind bars.

The judge sentenced Mirasalo to one year behind bars for that offense, but he only served six and a half months after he got permission to care for his sick mother.

He was charged again for criminal sexual assault in March 2010 for raping a victim between 13 and 15 years old and pleaded no contest before a judge sentenced him to prison in that case.