In a shocking incident, a US judge granted joint custody of an eight-year-old boy to a convicted sex offender who had raped the child's mother when she was 12 years old.

Christopher Mirasolo from Michigan was given parenting time and joint legal custody of the child by Judge Gregory S Ross after a paternity test found he was the father. The 27-year-old had raped the girl some nine years ago and also threatened to kill her.

Mirasolo was 18 when he attacked the girl in September 2008. A month after the assault, the girl found out that she was pregnant. Mirasolo was arrested, but he was only given one year of sentence.

He didn't serve the full sentence, though, and was released after six months to care for his sick mother.

"She (the victim) and her family were told first-time sex offenders weren't sent to prison because people come out worse after they go there," Rebecca Kiessling, the girl's attorney, said.

Kiessling, who is seeking protection under the federal Rape Survivor Child Custody Act to halt his access to the child, told The Detroit News: "Nothing has been right about this since it was originally investigated. He was never properly charged and should be sitting behind bars somewhere, but the system is victimizing my client, who was a child herself when this all happened."

The attorney claimed that Judge Ross not only granted the joint custody of the child, but also disclosed the victim's address to him and ordered the victim to add Mirasolo's name to the child's birth certificate. "This is insane," Kiessling added.

A hearing has been scheduled for 25 October.

Meanwhile, it was reported this wasn't Mirasolo's only rape charge. In March 2010, he had raped another minor and was given four years of prison time for that.