A 13-year-old British boy with severe allergies died after a classmate flung a piece of cheese at him — and said at an inquest that he did not know an allergy could be fatal, according to reports.

Karanbir Singh Cheema suffered a serious allergic reaction when the slice of cheese hit him in the neck area at his school in Greenford, West London, on June 28, 2017, the Telegraph reported.

The asthmatic boy — also known as Karan — was severely allergic to all dairy products, eggs, nuts, wheat and gluten, and also suffered from atopic eczema.

The teen went into anaphylactic shock and was taken to the medical room of the William Perkin Church of England High School, where he was given the drug piriton and treated with an EpiPen and his inhaler.

But shortly after paramedics arrived, Karan, who was gasping for air, stopped breathing and was rushed to Great Ormond Street Hospital, where he died 10 days later.

The boy who threw the cheese, who is now 15, apologized to Karan’s parents Wednesday during an inquest at Poplar Coroners’ Court.

“I didn’t mean any harm — I’m sorry, I’m sorry for what I did,” the boy said from behind a screen.

The boy claimed he was unaware of Karan’s dairy allergy — although he knew his classmate was allergic to bread after a prior incident.

“Someone was eating a sandwich next to him and he asked them to move,” he said. “I knew that he was allergic to bread but that’s all I knew.”

Asked by coroner Mary Hassell if he knew what reaction a person could get from an allergy, the boy said: “I thought maybe he would get a fever or a rash and miss school for a while … I didn’t know it could lead to death.”

He said he threw the cheese from about a foot away in an act that was “usual behavior in year eight.”

Another boy who handed the cheese to his classmate said he knew Karan was allergic to dairy products — but didn’t know cheese was dairy.

“At the time I didn’t know dairy was cheese. Milk and yogurt, I would say, that was dairy. I knew he was allergic to some things, dairy and pollen,” he said. “I knew he probably had more (allergies), but I was only informed of the other ones.”

Addressing the family, he said: “I just want to say that I didn’t mean any harm — I’m sorry, I’m sorry for what I did.”

Karan’s mom, Rina, said in a statement read in court that her son was “diligent” about his medical conditions and was in good health the morning he died.

She said a consultant at the hospital told her it was unlikely that skin contact with a food could cause a person to go into anaphylactic shock.

“In her 30 years in medicine, she was confident that a child wouldn’t have an anaphylactic reaction with something going down his neck,” she said.