Pieper Lewis, 17, was also sentenced to pay $150,000 (£130,350) in restitution to Zachary Brooks’ family for his murder in Des Moines in 2020. She was 15 years old at the time.
She pled guilty to involuntary manslaughter and willful harm last year. Both offences carry a maximum sentence of ten years in prison.
If she breaks her probation terms, she faces a 20-year prison sentence. Polk County District Judge David M Porter sentenced Lewis on Tuesday.
The judge ordered that she be placed in a residential institution and wear a tracking device as part of her probation.
“The next five years of your life will be full of rules you disagree with, I’m sure of it,” Mr Porter said. “This is the second chance that you’ve asked for. You don’t get a third.”
While he acknowledged the contentious nature of Lewis being obliged to pay Mr Brooks’ family, he also stated that “this court is faced with no other alternative” under Iowa law.
“My spirit has been burned, but still glows through the flames. Hear me roar, see me glow, and watch me grow,” Lewis read on Tuesday from a statement she had prepared, the Associated Press news agency reports.
“I am a survivor,” she mentioned.
Lewis was sleeping in a corridor after leaving an abusive family in 2020 when she was taken in by a man who trafficked her to others for prostitution.
She said in court that one of them was Brooks, 37, and that he had raped her several times.
When she was 15, the adolescent stabbed him more than 30 times in a flat in Des Moines, Iowa, the state capital in the Midwestern area.
Lewis admitted to committing a crime but defended her conduct.