The US ambassador in Doha on Thursday formally apologised to Qatar after a video was posted online showing laughing American soldiers stationed in the Gulf allegedly insulting the emirate's flag.
Dana Shell Smith took to Twitter to apologise and called on the US military to investigate the incident after having been summoned by Qatar's foreign ministry.
"I have presented my apology to the government of Qatar and instructed the US military command to investigate the incident and take disciplinary action," she said on social media.
"My dear followers, please be assured that those soldiers were making fun of themselves and not the state of Qatar."
The ambassador, who has served in Doha for the past two years, added that Qatar was a "staunch ally and an old friend".
The video shows a male and female soldier in fatigues standing in front of US and Qatari flags.
The pair are shown joking and laughing, saying they are being filmed at an "unknown dislocation".
The male soldier then says they are "in a place called ummm", and points to the flag of Qatar, one of Washington's closest allies in the Middle East.
The woman soldier repeats the word "ummm".
It is not clear when or where the video was filmed, though it appears to have been circulating online from Wednesday.
Insulting the national flag in Qatar is a serious offence punishable by law.
Anyone deemed to have shown disrespect to the flag can face up to three years in jail and a fine of 200,000 Qatari riyals ($55,000), under a law passed four years ago.
The foreign ministry also took to Twitter to say it was seeking answers from the Americans over the actions of the soldiers.
The ambassador "was asked for an explanation of the contents of that video", it said.
Online reaction was mixed with some locals praising the American ambassador for her prompt apology, while others tweeted that the soldiers be "held accountable".
The video was still widely available on social media on Thursday.
Qatar hosts the largest American air base outside of the United States.
Al-Udeid base, home to around 10,000 military personnel, is used as a hub for US air strikes against the Islamic State jihadist group in Syria and Iraq.
US First Lady Michelle Obama visited the base while on a trip to the Gulf last November.