A South Carolina man has been given a 45-year prison sentence for shooting a mother who intervened to stop him from raping her 6-year-old daughter, court documents reveal.

Nate Hunter, 34, was convicted of burglary, attempted murder, criminal sexual conduct with a child, and illegal possession of a gun for the April 2014 break-in of a home in West Columbia, South Carolina, according to Fox Carolina.

Police had charged Hunter under the suspicion that he broke into the home and ordered the mother and the little girl to strip naked. He then grabbed the girl to molest her, but the child’s mother attacked. Police said Hunter then shot the woman five times.

Despite being severely wounded, the enraged mother was able to fight the suspect off and push him out of the home.

In court, prosecutors said Hunter left a stocking cap behind after he fled and DNA linked the cap to the suspect. Hunter’s DNA was already in the CODIS system and the match led police to arrest him as a suspect, WLTX 19 reported.

Once arrested, police were also able to test a .40 caliber pistol in his possession and found it matching the bullets recovered at the scene of the home invasion.

Both the mother and the now 9-year-old girl testified against Hunter during the court proceedings.

Addressing the court, the little girl’s mother said that Hunter had “forever stolen her daughter’s security and innocence.”

Follow Warner Todd Huston on Twitter @warnerthuston or email the author at igcolonel@hotmail.com.