By all accounts, the system seemed to work for Bernard Allen. Troubled in his teens, he joined a gang and, at age 16, went to prison for seven years for his involvement in a drive-by shooting in Mesa.
When he got out, a judge ordered him to undergo mental health treatment for an illness he developed over time.
By last September, things were on the up. He had a job and was dealing well with his disease. A Maricopa County Superior Court judge allowed him to end his probation early.
But this week, police say something happened - or snapped, perhaps - that caused the 25-year-old to randomly stab two strangers in two days at Mesa's Fiesta Mall, killing one of them.
On Tuesday, Allen was in jail, held without bail on suspicion of homicide and assault.
The events tore through the family of Issurah Jackson, 31, who was stabbed to death in a food court bathroom, and put another man, Lathaniel Brown, 25, in the hospital with serious injuries.
It led police, probation and court officials to ask: How did this all happen?
"There was no indication that the guy was going to be violent at all," said Jeff Trollinger, a supervisor in the county's adult probation department. "He was doing pretty well."
So well, in fact, that a judge last year let Allen finish his probation nearly a year and a half before his April 2009 stop date.
The probation stemmed from a felony conviction when he was 16 for shooting a gun at a building during a 1998 drive-by as part of his former membership of the South Side Mesa street gang. Police had previously said the conviction was for murder, but retracted that on Tuesday.
During his time on probation, Allen went through court-ordered treatment for a serious mental illness known as schizoaffective disorder, records show.
The disease is part schizophrenia and part mood disorder. Depending on the person, it can result in severe mood swings, depression, and hearing and seeing things that aren't really there.
The voices and images can often be negative and angry, causing paranoia and suspicion, experts say.
Trollinger said Allen's mental illness would not have prevented him from being released from probation early if he could show he was dealing with it well.
"What I don't want to get out to the public is that a person who is mentally ill is any more dangerous than somebody who is not," Trollinger said. "Statistics show that's not the case."
It's not clear how extensive Allen's treatment was, because court records about it are sealed. But Trollinger said Allen would have checked in regularly with a probation officer monitoring his treatment.
That kind of close contact can be very healthy for the mentally ill, said Sherri Walton, vice president of the Arizona chapter of Mental Health America, which was not involved in his care.
"He would have had more access to services, because he had someone who was working with him," Walton said.
Oftentimes, the courts and corrections are a person's first interaction with mental health care, she said.
After Allen's arrest Monday, he told detectives he visited his doctor just two hours before the slaying took place and received some medicine and a prescription for more, court records show.
He also said he had been blacking out and suffering from other symptoms, the records show. Those details add to the timeline of events that trickled out slowly from the police investigation.
About 24 hours after Brown was stabbed in the throat with a pocketknife, police said Allen purchased an 8-inch butcher's knife at a small store on the mall's lower floor called The Knife Shop.
Police said Allen then made his way upstairs, where he walked into a bathroom near the food court, bumped into Jackson and reportedly stabbed him to death.
When police arrived at the mall, they found him outside on a bench with a bloody knife and a receipt that showed he paid $41.60 for it, records show.
In both incidents, police said Allen got angry at the men because he believed they were "disrespecting" him.
Jackson's family members were in shock a day after his death.
"He was such a friendly boy," said his mother, Mary Babbitt, who cried as she moved some of her son's things out of his Mesa apartment. "He had never said anything to anybody."
A Westwood High School graduate, Jackson was working for a business that made equipment for the military and helping his mother pay her way through massage school.
He hoped to start college on his own in the fall, Babbitt said.
"It is terrible. It is very terrible," she said, "Why my son? He's so innocent."
The other victim, as well as Allen's family, could not be reached Tuesday for comment. According to court records, Allen told police he didn't know either of the victims, but felt remorse for both of them afterward.
Police continued Tuesday to gather clues as well as review whether the department should have warned businesses and shoppers at the mall about the first day's stabbing before the second one took place, said Mesa police spokeswoman Detective Diana Tapia.
"At the time the first incident happened, we didn't have a whole lot of information to go by," she said. But she added, "We always debrief on major incidents."
The department will hold a community meeting at 6:30 p.m. today at Rhodes Junior High School in Mesa to discuss the attacks.