An 18-year-old student accused of stabbing his classmate to death Wednesday at a New York City school has been charged with a series of offenses, including murder.

The attack at the Urban Assembly School for Wildlife Conservation in the Bronx left 15-year-old Matthew McCree dead and Ariane LaBoy, 16, in critical condition, police told the New York Post.

Student Abel Cedeno, 18, was charged with murder, attempted murder, manslaughter, attempted manslaughter, assault and criminal possession of a weapon.

Cedeno snapped after repeatedly being bullied over his personality, according to a friend and former student.

“They were harassing him and that’s when he did what he did,” a friend who would only identify herself as Tanaisha B. told the newspaper.

Tanaisha said she had graduated from the school in June and knew Cedeno "really well."

Police said that McCree tossed his pencil at Cedeno when he got up to leave the room, the New York Daily News reported. The pencil missed Cedeno, but it set off the confrontation between the two.

“We believe this argument has been going on for about two weeks into the school year and it escalated,” said NYPD Police Chief of Detectives Robert Boyce. “A fight erupted today after some back and forth.”

“I heard he was being harassed,” Tanaisha said. “He’s not aggressive. Everybody loves Abel. He’s not a bad kid.”

New York City Mayor Bill de Blasio said "all our hearts are heavy right now" during an appearance at the precinct.

"My heart goes out to the families who have been affected by this tragedy," he said, according to AM New York. "It’s unacceptable to ever lose a child to violence in a school building."

De Blasio said the city would double down on efforts to keep kids safe in school. Parents rushed to the Bronx facility after the attack to check on their kids.

Urban Assembly School for Wildlife Conservation serves grades 6-12, and is co-located with elementary school PS 67. The school -- which doesn't have metal detectors -- performs below average in state exams, according to the New York Post.

“I don’t even know what to say to these kids,” Dejohn Jones, the president of a parent association at a nearby school who came to console students, told AM New York.