Donte Crawford, 18, was acquitted of first-degree murder Friday in the stabbing death of Ananias Jolley at Renaissance Academy High School in Baltimore. (N/A/Baltimore Police)

Before Donte Crawford was accused of stabbing a classmate in the heart at their West Baltimore high school, he had been bullied for months, he and his relatives told a Baltimore jury.

Crawford, now 18, testified Friday at his trial for first-degree murder that 17-year-old Ananias Jolley and some of his friends had been tormenting him, according to the Baltimore Sun. They attacked him after school, he said, and ridiculed him about his mother, who would show up at Renaissance Academy High School intoxicated.

One of Crawford’s cousins testified that he was there when the teenager was kicked and punched repeatedly, the Sun reported. Another cousin told the jury that the family tried to remove the teenager from Renaissance because he was being threatened.

Relatives said they went with Crawford to Jolley’s house to try to make peace. But Jolley, a senior who dreamed of becoming an architect, wasn’t home.

Nikkia Rowe, the head principal at Renaissance Academy High School, keeps of photo of Ananias Jolley on the shelf behind her desk at Renaissance Academy in West Baltimore. (Jahi Chikwendiu/The Washington Post)

Crawford cried on the witness stand as he described the threats that were made against him on the day of the attack — Nov. 24, 2015. He acted that day in self-defense, he said.

“I felt somebody was going to do something after school,” he testified. “I just didn’t know what.”

Instead of waiting to be beaten up, he told the jury, he went into the classroom to confront Jolley. The two began to fight, and Crawford said he feared that he would be killed: “I tried to fight him back. I just got scared and started jabbing. I had a small pocketknife and just started jabbing. I was trying to get him off of me. I had no intention of hurting him.”

But prosecutors argued that Crawford had arrived at Renaissance intending to stab Jolley.

Teacher Wanda Quick testified that Crawford knocked Jolley from a stool and then got on top of him as they struggled on the floor, according to the Sun.

Surveillance video from that day showed Crawford pacing outside the biology class before entering the room. In the next images, Crawford ran out, followed seconds later by Jolley, who stumbled into the hall and fell into the arms of his school mentor.

On Friday, the jury had to decide whether Crawford, charged as an adult, was guilty of murder in Jolley’s death. They found Crawford not guilty, eliciting screams from the slain teen’s mother, Tiffany Jolley, the Sun reported. The jurors also considered second-degree and manslaughter charges, but did not convict Crawford of those.

Rochelle Ritchie, a spokeswoman for the Baltimore state’s attorneys office, issued a statement Friday night calling the killing “an absolutely tragic incident that did not have to happen, especially in a school where our children attend with the expectation of learning and not being killed. We send our deepest condolences to the victim’s family, who should not have had to bury their son at such a young age.”

Both Crawford and Jolley attended Renaissance, a public high school one mile from the intersection that exploded in riots last year after the death of 25-year-old Freddie Gray, who was injured while in police custody. Jolley was the first of three Renaissance students lost to violence during the 2015-2016 academic year.

The teens were part of an innovative mentor program that has garnered national attention. The program, called “Seeds of Promise: Transforming Black Boys into Men,” pairs young men who have been flagged as needing guidance with African American men who come from similar backgrounds.

The program’s success can be seen in graduates such as Khalil Bridges, who after being featured in a Washington Post article about his struggles, is now attending community college.

Bridges and Crawford shared the same mentor, Antwon Cooper.

Before the stabbing, Cooper said he had seen improvements in Crawford, who was learning to read and coping with a troubled home.

“He was a kindhearted kid,” Cooper told The Post earlier this year. “He was making such progress and trying to become a better person. He was becoming a better kid.”

John Comer, who works at the school though the nonprofit organization Communities United, said he once saw Crawford in a counseling circle, crying. Later the same day, he saw him again, this time standing outside the school, posturing with flexed muscles as a group of teenagers taunted him across the street.

Crawford was featured in video the Sun published of students discussing their community. In it, he describes what it means to survive in West Baltimore.

“Try not to get killed before you’re, like, 21,” he says. “Or get locked up until you’re, like, 30. That’s about it.”

About a month after that video, authorities charged Crawford in Jolley’s slaying. Jolley had died a month after the stabbing, just before Christmas.

In response to a devastated school community, Renaissance Academy Principal Nikkia Rowe turned the slain teen’s name into a motivational mantra. Rowe gave students T-shirts that read “Graduate for Jolley.”

And many did. Among the 60 students who walked the stage in June was Jolley’s brother, Santonio Jolley, 20, who had dropped out but reenrolled after the death. When Santonio accepted his diploma, he carried an empty cap and gown on a hanger for his brother.