The coffee chain that Coke is buying just had an avocado-bashing ad banned

A commercial for U.K. coffee chain Costa has been banned for suggesting that bacon sandwiches and egg muffins are better breakfast choices than an avocado.

Costa, which is to be bought by Coca-Cola in a $5.1 billion deal, ran a radio ad promoting a sandwich and coffee deal that stated: "Oh, there's a great deal on ripen at home avocados. Sure, they'll be hard as rock for the first 18 days, three hours and 20 minutes, then they'll be ready to eat, for about 10 minutes, then they'll go off.

"For a better deal, head to Costa Coffee and grab a delicious, piping hot bacon roll or egg muffin for just £2 ($2.60) when you buy any medio or massimo hot drink or flat white before 11 a.m."

But after two people complained to U.K. body the Advertising Standards Authority (ASA), it ruled that the ad must not be broadcast again because it "discouraged the selection of fresh fruit" and was in breach of a rule stating advertisers must not "disparage good dietary practice."

The ad was originally broadcast in June, and future ads must not encourage poor nutritional habits, the ASA told Costa.

In August, Coca-Cola agreed to buy Costa from Whitbread for $5.1 billion, including debt, to extend its push into healthier drinks and take on the likes of Starbucks, according to a Reuters report.

In its response to the ASA, Costa said its ad was not suggesting people choose an avocado over a bacon sandwich or egg muffin, but that it "had a promotional offer to satisfy breakfast requirements." It said that the ad "centred on the frustration and unpredictability of the avocado," which has become a popular breakfast dish.

Radio ads in the U.K. must be cleared for broadcast by Radiocentre, which said that it would be "unlikely that the majority of consumers would regard the ad as a serious comparison between bacon rolls and egg muffins and avocados," according to the ruling on the ASA's website. But the ASA, which looks at complaints against commercials, disagreed.

"We considered that, although the ad was light-hearted, it nevertheless suggested avocados were a poor breakfast choice, and that a bacon roll or egg muffin would be a better alternative, and in doing so discouraged the selection of avocados," the ASA stated on its website.

Costa had 2,467 stores in the U.K. and 1,415 internationally as of May. If Coca-Cola takes Costa to the U.S., it's more likely to be in food service, such as supplying coffee beans, rather than opening stores, CEO James Quincey told CNBC's Sara Eisen in August.