The British embassy in Washington has apologized for posting a tweet commemorating the 200th anniversary of the burning of the White House by British troops on August 24, 1814.

The British Embassy had posted a picture of the deputy British ambassador to the United States, Patrick Davis on Twitter on Sunday. The caption to the picture said that he was participating in "the anniversary of burning of the White House with a BBQ," reports Fox News.

An hour later, another picture was posted which showed a White House replica on top of a sheet cake flanked by sparklers.

The caption of the photo this time was "Commemorating the 200th anniversary of burning the White House. Only sparklers this time!"

The embassy received several angry responses to the tweet within hours.

Historian Cindy Gueli tweeted that the party at the embassy where the cake was served was maybe not in the best taste.

"Good to know the US isn't the only country with a mentally deficient diplomatic corps that doesn't know how to tweet," was the response of another user, reports The New Zealand Herald.

After three hours, the social media staff of the embassy apologized by posting "Apologies for earlier tweet. We meant to mark an event in history & celebrate our strong friendship today."

The account also posted a link to an essay by deputy head of mission, Patrick Davies, titled "The Torch of Friendship", which gives a thorough history of the 1814 incident.

The War of 1812 between the US and Britain lasted for two and a half years. It was declared by President James Madison who wanted to end the frequent British interference in North America.

On August 24, 1814, British troops barged into Washington and set fire to the White House and the Capitol building. They were forced to go back after a tornado struck the area, reports The New Zealand Herald.