A teenager avoids jail time for attacking classmates at Valparaiso High School.
Seventeen-year-old James Lewerke pleaded guilty but mentally ill to eight felony counts in December.
Friday, a judge sentenced Lewerke to remain in a mental health treatment center until he is 21.
After that, he will spend nine-and-a-half years on probation.
Back in November of 2004 outside of Valparaiso High School, Lewerke slashed fellow students with a machete and a tree-saw at the beginning of Spanish class.
Seven students were cut or hurt.
Lewerke could have been sentenced to up to ten years in prison.