In this frame grab from video provided by WABC, police are gathered near the front door of Urban Assembly School for Wildlife Conservation in New York, Wednesday, Sept. 27, 2017. Police say a 15-year-old boy has been stabbed to death and a 16-year-old critically injured when they were attacked at the school which has middle and high school students attending. Picture: WABC via AP

New York — A high school student who'd been fighting with two classmates suddenly attacked them with a switchblade during history class Wednesday, killing one boy and gravely wounding another, police said.

The melee unfurled about 15 minutes into third period at the Urban Assembly School for Wildlife Conservation, a middle and high school in the Bronx, the New York Police Department said.

Chief of Detectives Robert Boyce said the 18-year-old suspect stabbed a 15-year-old once in the chest and a 16-year-old in the chest and side. The 15-year-old died at a hospital, while the 16-year-old is in critical but stable condition.

The 18-year-old then walked out into the hallway, where he met a counsellor and handed her a bloodied switchblade, police said. He went to the assistant principal's office and quietly sat waiting for the authorities to arrive, Boyce said.

About 15 to 20 other students were in the classroom at the time of the stabbing, but no one else was injured, Boyce said.

Students described tense moments huddled in closets and in classrooms while the school was locked down, wondering what was happening.

"The guidance counsellor couldn't even keep herself calm," said eighth-grader Abbie Mincey. The counselor told them: "I've never seen so much blood in my life."

Boyce said the 18-year-old was in custody and was being questioned by police. Authorities were looking into whether the teen had been bullied, but it appeared their dispute had been going on for about two weeks. They had been tossing paper at one another shortly before the stabbing, authorities said.

Angry parents, some in tears, gathered outside the school demanding they be allowed to pick up their children. Police and emergency crews swarmed the 1 100-student school, located in a large red brick building that also houses a public elementary school. The building does not require children to pass through metal detectors.

Denise Jackson, mother of a high school freshman Briana Collins, said she was terrified. She doesn't know if she'll keep Briana in the school.

"She hasn't been here for a month yet. I don't know if I want to keep her here," she said. "I just don't know."

She said she doesn't think the school needs metal detectors, but she also has to consider her daughter's safety.

Chief Joanne Jaffe, head of NYPD's community affairs, said about 75 schools around the district are equipped with metal detectors, and they would do random sweeps of all schools for the time being. New York has the nation's largest school district, with more than 1 million students.

Giselle Estevez, the mother of 9- and 13-year-old girls, said she'd seen violence at the school before and this latest attack was the final straw. She plans to pull her daughters out of school.

"There is too much fighting, too many older boys," she said in Spanish. "Look at my child, she is small, 9 years, and the other 13. ... And they're crying, wondering what is going on, and the school didn't even call me."

It's the first homicide on New York City school grounds since 2014, when a fight between two 14-year-old boys ended with one stabbed to death outside Intermediate School 117 in the Bronx. The last time someone was killed inside a school was at least 20 years ago.

Mayor Bill de Blasio and Schools Chancellor Carmen Farina said they were saddened by the attack and understood the fear parents would have.

"All of us are feeling this tragedy very personally," said de Blasio, a Democrat.

Associated Press