FORT LAUDERDALE, Fla. -- A Florida teenager was not insane and knew the consequences of his actions when he nearly killed a 15-year-old girl by savagely kicking and stomped her head outside a school, a prosecutor told jurors Friday as an attempted murder trial drew to a close.

In a closing argument, Assistant State Attorney Maria Schneider said Wayne Treacy's careful planning of the attack and messages beforehand to friends about going to jail for killing someone show that he knew what he was doing. Experts testified that Tracy suffered from post-traumatic stress disorder because of his brother's suicide, but Schneider said that illness alone was not enough.

"Is there something wrong with Wayne Treacy? Yes, there has to be. But that is not what the law finds as an excuse," Schneider said. "Despite any mental illness they want you to focus on, he is legally and morally responsible for his actions."

Treacy, 17, faces a maximum 50-year prison sentence if convicted of attempted first-degree murder in the March 2010 attack on Josie Lou Ratley, who suffered permanent brain injuries. The defense is seeking acquittal by reason of insanity. Jurors are scheduled to begin deliberations Monday.

The attack happened at the Deerfield Beach Middle School bus loop after an escalating series of insulting and taunting text messages between Treacy and Ratley. Treacy began making death threats against Ratley within a few minutes, phone records show, then became fully enraged when she sent one telling Treacy to "go visit your dead brother."

"Watch how much you laugh when I strangle the life out of you. You said the wrong thing to the wrong person," Treacy said in one text.

Defense psychiatrists testified that Treacy was pushed by the text about the brother into an altered state of consciousness called "dissociation" in which he wasn't aware of or able to control his actions. Treacy was 15 when he witnessed his brother's suicide by hanging himself with an orange extension cord from a churchyard tree.

"How messed up in his head was he when he saw his brother hanging from a tree two days after his 15th birthday?" asked Treacy attorney Russell Williams in his closing argument. "What happened to Josie Ratley is awful. There would be no rational reason for anybody to do that."

Yet prosecutors asked the jury to focus on what Treacy did after making the threats. He told several friends he would be going to jail and even described how he would assault his victim. He put on steel-toed boots and black martial arts gloves, wrote out a brief will, rode his bicycle to the school and had a friend point out Ratley, whom he did not know. Ratley had let the friend, Kayla Manson, use her cell phone to communicate with Treacy before the texts between the two of them began.

"Shutting out everything else and concentrating on something does not make you insane. It means you're focused," Schneider said. "Rage is not insanity, and that's what we have here."

Jurors will be given several options to find Treacy guilty of lesser offenses, such as aggravated battery and attempted voluntary manslaughter. Even if he is acquitted under the insanity defense, he might be committed to a mental institution to get treatment, Williams said.

Manson, the friend who pointed out Ratley, is charged as a juvenile with being an accessory to attempted murder and faces trial in August.