The British embassy in Washington has apologised after tweeting a picture of a White House cake surrounded by sparklers, "commemorating" the burning of the building 200 years ago.
The US presidential residence was set on fire by British forces in 1814 during the "War of 1812" with the United States.
A number of Twitter users said the embassy's tweet was "in poor taste".
The embassy later said: "Apologies for earlier Tweet."
It added: "We meant to mark an event in history & celebrate our strong friendship today."
British troops led by Maj Gen Robert Ross attacked and burned public buildings including the Capitol, Washington Navy Yard and the president's mansion during the conflict.
It was the only time that a foreign power has captured and occupied Washington.
The offending tweet on Sunday read: "Commemorating the 200th anniversary of burning the White House. Only sparklers this time!"
The British embassy message, published on its official Twitter account, has been retweeted more than 4,000 times.
One user questioned: "Is this suppose [sic] to be funny"?
Another wrote: "I think this is in extremely POOR TASTE."
An apology was issued on the account two hours after the original message.