A bullied Bronx high schooler brought a switchblade to history class because he was itching to use it, a prosecutor said Friday, in closing arguments in the manslaughter trial of Abel Cedeno, the teen who killed one classmate and seriously injured another during a 2017 brawl.

But Cedeno — who’d been taunted for years for being gay — was only intending to protect himself when he tucked his switchblade into the right pocket of his shorts that morning, his lawyer countered.

Cedeno first waved his switchblade in warning at the two classmates — and only stabbed them after they pelted him with punches despite the knife, the lawyer, Christopher Lynn, argued.

“I submit to you that Mr. Abel Cedeno is not guilty of the charges in this indictment because he did not attack anyone that day,” he said.

Bronx Supreme Court Justice Michael Gross, who is presiding over the non-jury trial, said he will render a verdict on Monday.

Assistant District Attorney Nancy Barko began her closing arguments by setting the scene for what she called Cedeno’s vengeful “massacre.”

“On Sept. 27, 2017, it was a warm, sunny day for students attending school” at the Urban Assembly School for Wildlife Conservation in Tremont, she said.

“It ended as a dark scene of massacre. A 15-year-old, Matthew McCree, a student who was in the 11th grade, was wheeled out of school dead.

“A 16-year-old, Ariane LaBoy, a student in the 11th grade, was wheeled out severely disabled and physically and emotionally scarred for life. All the work of Abel Cedeno,” she said.

“Why? Because this 18-year-old, Cedeno, brought his new knife to school, set on creating this opportunity to use it,” she said.

“Cedeno is tough and he was going to prove it.”

Cedeno had no recorded history with McCree or LaBoy, the prosecutor said.

The knife was thrust with so much force that the depth of the wounds it caused ranged from “2 1/2 to 3 1/2 inches” deep — force inconsistent with someone simply wielding a knife in self-defense, she said.

“These injuries were deliberate and intentional,” she said.

Also, Cedeno’s account of having been hit with crunched-up paper balls and pens and pencils moments before the brawl is belied by crime scene photos of the classroom floor, she said.

“I urged the court to look closely at the crime scene photographs. There was little on the floor other than the pools of blood where Matthew and Ariane was stabbed,” she said.

Cedeno brought the knife to school that day because “his intention was to use that knife,” she said.

“The intent was clear – he wanted a physical challenge.”

The defense lawyer countered Cedeno knew that it was a dangerous school, and that students sometimes carried knives.

And so, when two students — best friends McCree and LaBoy — came at him despite his knife, Cedeno had to assume that they, too, must be armed, Lynn argued.

“He reasonably believed others in that class had weapons or access to weapons,” Lynn said.

“Wasn’t Abel telling the world he wanted the would-be attackers, in general, to stay away from me?” he asked.

“It was reasonable for Abel to believe that the students who were about to attack him were armed,” or they wouldn’t have come at him despite the knife, he said.

“Abel’s only purpose in the use of the knife in the classroom that day was to protect himself from physical harm,” Lynn said. “His purpose was to deter.”