They thought it would be funny: During lunch, the boys threw peanuts at a fellow student with severe food allergies. The Los Angeles area fifth-grader was so sensitive to nuts that exposure might send him to the emergency room.

He said: “No, stop. That could kill me.” When he turned away to talk to a friend, one of the boys stashed peanuts in the container that held his lunch. Seeing the nasty trick, the allergic boy’s friends quickly grabbed the container and threw it away, possibly saving their friend from a terrible incident.

This incident from 2015 appeared on a website for families dealing with food allergies. The mother of the bullied boy was interviewed for this story but spoke on the condition of anonymity because of privacy concerns.

Food is a prop for celebration and for pranks. We throw rice at a wedding and a whipped-cream pie at a clown. But there’s nothing funny about it when bullies turn food into a weapon to frighten or harm those with allergies. Researchers have recently begun studying these incidents.

Bullying, harassing and teasing of children with food allergies seems “common, frequent, and repetitive,” concluded a 2010 study that surveyed 353 food-allergic teens, adults and the parents of food-allergic children.

Food allergies affect an estimated 15 million Americans, including 6 million children, according to Food Allergy Research & Education, an advocacy group. That amounts to 1 in every 13 young people in the classroom. The prevalence of food allergies among children rose to 5.1 percent in 2009-2011 from 3.4 percent in 1997-1999, according to the Centers for Disease Control and Prevention.

For those afflicted, ingestion of certain foods makes the immune system overreact; reactions can range from mild, such as itchiness, to potentially fatal anaphylaxis, a condition that can include trouble breathing and poor blood circulation.

Eight foods seem to cause most reactions: milk, eggs, peanuts, tree nuts, soy, wheat, fish and shellfish. People with severe food allergies often carry lifesaving medications such as epinephrine injectors and must be extremely vigilant about their exposure to certain foods.

Sometimes even a small amount is all it takes to cause a reaction — and that small amount could be delivered in a bullying prank.

Several months ago, a Michigan college student had his face smeared with peanut butter, allegedly in a fraternity hazing that left him with swollen eyes. The student’s father said the fraternity had been made aware that he was severely allergic. As a result, a frat member faces misdemeanor charges.

[When even one drink could kill you]

Bullying related to food allergies “elevates play into violence,” said Sandra Beasley, author of the food-allergy memoir “Don’t Kill the Birthday Girl.”

Those responsible, she said, know what damage they may be causing when they punch someone or hold a victim underwater. But with food allergies, they “may not recognize the physical consequence of what they’re doing. They probably literally cannot measure it.”

Impact on quality of life

Several years ago, pediatrics professor Scott Sicherer noticed troubling stories from some of his patients at the Jaffe Food Allergy Institute at the Icahn School of Medicine at Mount Sinai in New York. Children would end up in tears because others had teased or threatened or criticized them about their food allergies. Some said that classmates had insisted they touch food containing an allergen dangerous to them. Parents were often unaware their children had been bullied.

Recognizing that bullying in general was becoming a problem, Sicherer and colleagues have focused on identifying the prevalence and impact of food-allergy bullying. In a survey of 251 families from an allergy clinic, the researchers reported in a 2013 study in Pediatrics, 31 percent of children reported being bullied or harassed specifically because of food allergies.

While bullying or harassment caused the children great distress, only about half of the parents knew about it when it was occurring, the study found. Children’s quality of life improved when their parents knew of the bullying, researchers found.

Bullying occurs for a variety of reasons, depending on the age of the bully.

“In general, bullying can happen anytime that somebody is different,” said Linda Herbert, an assistant professor in the Division of Psychology and Behavioral Health at Children’s National Health System. Sometimes bullying arises from ignorance, sometimes from a desire to exert power.

Very small children are often curious about peers’ being told to sit at nut-free tables and may question them about their special treatment. In grade school, an allergic child may be singled out at parties or activities that involve food and subjected to bullying.

As children grow older, they develop a wide range of bullying and teasing tactics, according to Herbert. Some will mock a person who has an allergy and is different. “I’ve even had kids who’ve had very active attacks against them,” Herbert said. In one case, she said, a bully wiped peanut butter on a child and taunted, “I dare you to die today.”

Sometimes, teachers can make the situation worse. “We were surprised to find that teachers were included on the list of perpetrators,” Sicherer said. If a teacher singles out a child as the reason a party will be avoided or an activity missed, “maybe that doesn’t fall into the definition of bullying, but at least from the perspective of the child, it does,” he said. “That’s the kind of subtleties that happen here.”

In high school, Tori Appelt endured some teasing because of her severe food allergies, but usually she and her friends buddied up and avoided those situations.

But Appelt, a 19-year-old freshman at the University of Arizona who is a member of a teen advisory group for FARE, found the worst treatment in high school came from adults. A rec coach who knew about her condition joked that if she didn’t play well, she’d smear her face with peanut butter. To Appelt, who had been hospitalized many times for life-threatening reactions, there was little humor in that remark.

Appelt also had a teacher who seemed unmoved about the possible impact on her of a classroom experiment that involved making peanuts explode. Appelt explained that because exposure to nuts could make her sick, she probably shouldn’t even observe the experiment. Instead of devising a different experiment that would not jeopardize Appelt, her teacher told her to sit in the hall. “That’s not the kind of bullying people usually see, but I think that’s a form of exclusion,” she said.

Beasley, the memoirist with food allergies, has found herself reduced to tears by insensitive behavior.

“I’ve experienced people who congratulate themselves on being ‘sensitive’ to my allergies by drawing drastic and disproportionate attention to them. They crack jokes with a big wink, to make clear we’re all in on the joke,” she said. But, she added, “when I offer my own cues for how I’d like to be accommodated, they are ignored.”

She believes this is part of “a domineering and callous personality trait . . . which goes to the heart of determining who has the potential to be a bully.”

Real health consequences

Experts believe that bullying based on food allergies might be tempered by promoting awareness of the health consequences of those allergies and the social consequences of all types of bullying. “We learned it’s important to talk about it,” Sicherer said.

What’s needed, according to Beasley, is for more adults to talk about their experiences of food allergies and help diminish the sense of being different that leads to bullying. “That’s the thing that could be the game-changer to me,” she said. She has found that those who have been most considerate about her multiple severe allergies have had a friend or loved one with the same condition.

She said that some conditions have become more accepted when they are acknowledged by admired figures. Soccer’s David Beckham has helped normalize asthma ; Michael Phelps has done the same for attention-deficit/­hyperactivity disorder.

The friends of the Los Angeles fifth-grader who alerted him to the nuts in his lunch container were later recognized at a school awards assembly that included a talk on food allergies and bullying. The bully was suspended.

The boy’s mother doesn’t think people automatically understand the dangers of food allergies. “It’s our job to educate them,” she said.

Because food allergies are so much more prevalent than before, Herbert, the Children’s psychologist, said she thinks that children will understand them better.

“My hope,” she said, “is that as this generation gets older, these food allergies won’t be something that is cause for as much teasing and bullying.”