A Burger King tweet alerting customers it was "selling milkshakes all weekend" has been banned for condoning and encouraging anti-social behaviour.
The fast food firm's post came after a number of European election candidates had milkshakes thrown at them.
And a McDonald's in Edinburgh stopped selling the drinks before Nigel Farage addressed a rally in the city.
Burger King defended the tweet, calling it a "tongue-in-cheek reaction to recent events".
It read: "Dear people of Scotland. We're selling milkshakes all weekend. Have fun. Love BK. #justsaying".
The Advertising Standards Agency (ASA) said it considered the tweet "irresponsible".
The post on Burger King's official Twitter account followed a number of dairy-based incidents involving campaigners on the European election trail.
Stephen Yaxley-Lennon, who is known as Tommy Robinson, and UKIP candidate Carl Benjamin were both hit with food and drink during the build-up to the poll.
Former English Defence League leader Mr Yaxley-Lennon was drenched with milkshakes twice in two days as he campaigned in the north-west of England.
Days after his appearance at a Brexit Party rally in Edinburgh, Mr Farage was also later doused with milkshake during a campaign walkabout in Newcastle.
The ASA was critical of Burger King's tweet for condoning and encouraging anti-social behaviour.
It said 24 people complained that it was irresponsible and offensive because they believed it encouraged violence and anti-social behaviour.
The tweet was posted the day after a McDonald's outlet in Edinburgh put up a sign to say that it would not be selling milkshakes or ice cream by "police request".
Burger King said it did not endorse violence, which it made clear with a follow-up tweet reading: "We'd never endorse violence - or wasting our delicious milkshakes! So enjoy the weekend and please drink responsibly people."
The ASA said: "Although we acknowledged that the tweet may have been intended as a humorous response to the suspension of milkshake sales by the advertiser's competitor, in the context in which it appeared we considered it would be understood as suggesting that Burger King milkshakes could be used instead by people to 'milkshake' Nigel Farage.
"We considered the ad therefore condoned the previous anti-social behaviour and encouraged further instances. We therefore concluded that the ad was irresponsible."
The ASA added: "We told Burger King to ensure that its future marketing communications did not condone or encourage anti-social behaviour."
A Burger King spokesman said: "Our tweet regarding the situation in Edinburgh was intended to be a tongue-in-cheek reaction to the situation. It appears some have misinterpreted this as an endorsement of violence, which we absolutely reject.
"At Burger King, we totally believe in individuals' right to freedom of expression and would never do anything that conflicts with this. We'd never endorse violence or wasting our delicious milkshakes."