The filmmakers have been accused of creating a movie that "encourages food allergy bullying"

The new Peter Rabbit film 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.

The controversy triggered a mixed reaction and the hashtag #boycottpeterrabbit on social media - with some people describing the scene as "insensitive", and others as "funny."

One woman posted an image of her daughter crying in a bed and wrote: "This is what an anaphylactic reaction looks like in a child. This is AFTER epinephrine and Benadryl. It's NOT a punchline to a joke. #boycottpeterrabbit."

However, others didn't understand what the fuss was about.

Kenneth Mendez, the president and CEO of the Asthma and Allergy Foundation of America, also wrote an open letter to the studio urging it to "examine your portrayal of bullying in your films geared toward a young audience."

The studio and filmmakers said that they "sincerely regret not being more aware and sensitive to this issue, and we truly apologise."

The controversial scene is in a film adaptation of Peter Rabbit, the much-loved Beatrix Potter character, which was released in US cinemas at the weekend.

The movie, starring James Corden who voices the character of Peter, will hit the big screen in Ireland on 16 March.