JACKSONVILLE, Fla. -

A 21-year-old man was sentenced to 50 years in prison Tuesday afternoon for a 2007 rape, kidnapping and carjacking.

Kadeem Hart received 30 years for the rape and kidnapping, and another 20 years in an unrelated carjacking.

Hart, who was 15 years old at the time of the crimes, pleaded guilty to the last month.

According to investigators, Hart attacked a woman in January 2007 while she was walking home from the Eureka Gardens apartment complex. Hart grabbed the woman, held a BB gun up to her back, and then took the victim to a wooded area, where he raped her repeatedly, prosecutors said. After the attack, Hart let the victim leave the area, investigators said.

Hours later, Hart and a co-defendant were waiting as a woman tried to open a gate leading to her driveway. Hart approached the woman and then stole her car, authorities said. Jacksonville police said they caught up with Hart minutes after the crime.

Hart was convicted for the crimes in 2009. The conviction was reversed and a retrial was ordered due to a procedural error. Hart pleaded guilty right before jury selection began for his new trial.