The new film Peter Rabbit is facing a boycott over a scene in which he and his friends hurl blackberries at a character knowing he is allergic to them.
The scene has prompted a furious backlash with some people accusing the filmmakers of creating a movie that "encourages food allergy bullying".
The filmmakers and the studio, Sony Pictures, have apologised following the outcry over the scene in which Mr McGregor's nephew Thomas is forced to use an EpiPen as a result of the attack.
It comes after the charity group Kids with Food Allergies posted a warning about the scene on social media and said it had written a letter to the filmmakers.
It wrote in a Facebook post: "It is unnecessary for a film to show the characters intentionally attacking another with his food allergen to trigger anaphylaxis.
"Portraying anaphylaxis as a joke can cause some people to have a cavalier attitude about food allergies which can put kids with food allergies at risk.
"We are asking filmmakers to work with us to raise awareness about the seriousness of food allergies, and help us promote positive attitudes and safe environments for kids with food allergies."
So you think bullying a person with food allergies is OK?!? My daughter nearly died from one of her food allergies. We are proud to #boycottpeterrabbit due to the insensitivity portrayed. 1 out of every 13 kids in the US live with life threatening food allergies @SonyPictures— Quakes-JD (@JDMcCall1) February 12, 2018
This is pretty awful. And I don’t have allergies or kids. None needed to see the insensitivity. #boycottpeterrabbit— MaureenC (@PaMaureen) February 12, 2018
@SonyPictures you are deplorable #boycottpeterrabbit My 2 kids have horrible allergies & u make a joke of it. Not seeing this or any of your movies ever. Honestly not even sure what u were thinking making this scene.