Last week, two of the U.K.’s most venerated museums went to war on Twitter.

It began during #AskACurator Day on Sept. 13, when experts from more than 1,500 museums around the world took to Twitter to answer questions. One user, a self-described “part-time silly sausage” named @Bednarz, started the fracas by  asking, “Who would win in a staff battle between @sciencemuseum and @NHM_London, [and] what exhibits/items would help you be victorious?”

“We have dinosaurs. No contest,” London’s Natural History Museum  retorted — getting more than 1,400 likes and 400 retweets.

London’s Science Museum didn’t let that stand. “@NHM_London is full of old fossils, but we have robots, a Spitfire and ancient poisons. Boom!” it responded — generating more than 2,500 likes and 1,200 retweets.

In the exchange that followed — which spilled into the next day, when the Science Museum announced the two were friends again — the Natural History Museum touted its robot dinosaurs and vampire fish, which the Science Museum tried to one-up by tweeting about its “merman” and Polaris nuclear missile. The battle generated considerable media attention, including this entertaining account in Condé Nast Traveler.

It was just the most recent example of brands taking to social media to spar with their rivals — a practice that, at this point, has a long history. For example, after McDonald’s tweeted in March that “by mid-2018, all Quarter Pounder burgers at the majority of our restaurants will be cooked with fresh beef,” Wendy’s fired back: “[email protected] So you’ll still use frozen beef in MOST of your burgers in ALL of your restaurants? Asking for a friend.” The rejoinder garnered more than 180,000 likes. Although McDonald’s didn’t respond, plenty of other people did, and Wendy’s egged  them on. USA Today  proclaimed Wendy’s the victor in this Twitter war.

Also in March, after United Airlines refused to allow a woman traveling through its perks program to board a plane because she was wearing leggings, Delta tweeted: “Flying Delta means comfort. (That means you can wear your leggings. ????)” The tweet generated more than 118,000 likes.

These exchanges show that making fun of the competition on social media can be an effective strategy for building a brand’s exposure. But businesses considering this tactic need to tread carefully. While unexpected and witty posts can generate lots of likes and even mainstream media attention, tweets that are seen as outright attacks are less likely to go over well — and may even spark backlash from consumers loyal to the companies targeted.

Fortunately, following a few simple guidelines can help businesses from going astray. First, when starting a Twitter war with the competition, it’s important to use humor, not condemnation, according to Helio Fred Garcia, president of the Logos Consulting Group, who consults for Fortune 500 chief executives during social media crises. He also advises companies, “Don’t punch down; only punch up.” He adds: “It’s okay to attack a market leader or the government. It’s not okay to attack someone smaller, weaker or less well-known.”

The two British museums played by those rules. They were are evenly matched in prestige. Neither was cruel or degraded the other; as they sparred, they mostly focused on touting their own attractions. And the exchanges were light and funny. It was clear that both sides were having fun.

It’s also important to be brand-consistent. Garcia points out that companies like Southwest are known to be informal, so consumers expect them to be playful. The funny way both museums showed off was in keeping with the spirit of #AskACurator Day, which is designed to make institutions more accessible to ordinary people. But a Twitter war probably wouldn’t make sense for organizations that consumers expect to be more serious — like law firms or pharmaceutical companies, for example.

And if you’re going to criticize a company for something specific, make sure the complaint is justified and the problem is of the organization’s own making. Garcia warns that if the company is itself the victim of a crisis — like a hacking or natural disaster that disrupted operations — the tweet may be viewed as unfair.

A final thing to consider is whether your own organization might be vulnerable to criticism for the same thing for which you’re ribbing the competition, now or in the future. If so, it’s a safe bet that the company you attacked will choose that moment to re-tweet your post — and have the last laugh.

This column does not necessarily reflect the opinion of the editorial board or Bloomberg LP and its owners.

Kara Alaimo is an assistant professor of public relations at Hofstra University and author of “Pitch, Tweet, or Engage on the Street: How to Practice Global Public Relations and Strategic Communication.” She previously served in the Obama administration.

©2017 Bloomberg L.P.

This article was written by Kara Alaimo from Bloomberg and was legally licensed through the NewsCred publisher network. Please direct all licensing questions to [email protected].

Photo Credit: The Dinosaurs gallery at the Natural History Museum, London is all that. It's tough for London's Science Museum to top that. Natural History Museum, London