JACKSBORO, Tenn. (WVLT) -- Kenny Bartley took the stand in his own defense on day four of the trial.
Bartley is accused off shooting and killing assistant principal Ken Bruce and wounding principal Gary Seale and assistant principal Jim Pierce in 2005.
Bartley pleaded guilty to the shootings in 2007, but a judge granted him a new trial in 2011 after attorneys argued he hadn't been able to discuss the deal with his parents and he was pressured into it.
Bartley faces first degree murder, felony murder, two counts of attempted murder and gun and drug charges.
When Bartley took the stand, he apologized for what happened that day.
"I'm sorry. I'd do anything to take it back - that was the worst day of many people's lives," said Bartley.
He told jurors he'd taken prescription drugs the night before and Valium that morning. Bartley said he was searching for Xanax in his dad's room when he found the gun. He told jurors he loaded the gun and put it into his pocket and said he planned to trade it to his neighbor for drugs after school. Earlier in the week, other witnesses testified that Bartley loaded the gun just before the shooting.
Bartley said when he got to school, he told some friends about the gun and his plan for it and then snorted some Xanax. He said when the school resource officer came to get him out of class, he thought it was for attendance issues.
Bartley said he remained calm until all three principals were in Jim Pierce's office and Pierce told him they needed what was in his pocket. He said he got the gun out and panicked when he saw movement out of the corner of his eye. That's when he said he started firing randomly.
"I was scared, I felt threatened. I was trapped in the room basically with three grown men and after Mr. Seale tried to reach for the gun, I just panicked, I was scared," said Bartley.
Bartley told jurors that he fired the shots without aiming, but the district attorney showed him a copy of his original statement where he said he pointed the gun at the principals before firing.
Earlier in the day, several other witnesses testified, including Bartley's friend Trent Macullah. Macullah told jurors that Bartley told him he planned to trade the gun for two pills that day.
Preston Young also took the stand. Young testified that he ran into Bartley after lunch at the high school and was looking for tobacco. He said he touched Bartley's pocket and felt a gun. He said he and another student told assistant principal Jim Pierce about the gun.
"We told him Kenny Bartley had a gun and he said, 'Well, go back to class. We'll deal with it,'" said Young.
Retired firearms instructor Richard Quillah testified about fight or flight response. Isaacs asked Quillah if experiencing fight or flight response could result in firing a gun randomly.
"Well, it certainly could. A person in the fight or flight syndrome who perceives that there's a danger to his well-being - his intent would be to do whatever he has to do to ensure his own well-being," said Quillah.
Quillah also told prosecutors that someone could fire intentionally under the fight or flight syndrome.
After Bartley took the stand, the defense rested its case. Prosecutors called Bill Crowley to the stand as a rebuttal witness; Bartley had testified he was planning to trade the gun to Crowley for drugs.
Crowley told jurors he was a drug user and a drug dealer at the time, but that he'd never give drugs to children.
Closing arguments will begin at 8:30 Friday morning.
Local 8 News reporter Hilary Magacs is in court for the trial.
You can follow her updates on Twitter: @WVLTHilary.
For a full recap of each day's proceedings, follow us on air and online.