The U.S. Ambassador to Qatar has apologized, on Twitter and in person, for a video that showed two American soldiers laughing, with the Qatari flag in the background.

CNN notes that in Qatar, “it is illegal to insult or express a lack of respect for the flag and violators face prison terms of up to three years, and a potential 200,000 riyal fine (about $55,000).”

In the video, a male soldier talks into the camera, to the great amusement of his female colleague.

The male soldier makes sport of his supposed inability to talk about his “undisclosed location,” while gesturing at the Qatari flag. The two then embark on a largely unsuccessful attempt to convince each other the video is “serious business” and they should stop laughing.

This did not go over well with the Qataris, who evidently believe the American soldiers were mocking their country.

“Dear followers, please trust that those soldiers were making fun of themselves and not the country of Qatar. I offered my apologies to the Qatari government and I asked American military leaders to investigate the incident and take the proper ethical measures,” American Ambassador Dana Shell Smith wrote in Arabic on Twitter.

“Apparently that video offended some who saw it – some Qatari citizens who saw it,” State Department spokesman Mark Toner said at a briefing on Thursday. “Ambassador Smith took it upon herself as ambassador to Qatar to issue an apology on Twitter and also convey in person her apology to the Qatari Ministry of Foreign Affairs.”

Actually, Smith did not take this upon herself ; she was summoned by the Qatari Foreign Ministry and was “asked for an explanation of the contents of that video,” according to Reuters.

Reuters quotes more tweets from Smith in response to irate Qataris: “The U.S. military command was sent to investigate this incident and disciplinary action will be taken” and “Rest assured that these soldiers made fun of themselves and not of the state of Qatar.”

“We sincerely regret any offense the video may have caused in Qatar. The content of this video does not reflect the esteem the United States has for the state of Qatar,” added Pentagon spokesman Peter Cook, who promised the military would take “appropriate action.”

Qatar is one of the world’s wealthiest countries and hosts the largest U.S. air base in the Middle East. The Army Times looks at the history of the base to explain the inside humor on display in the video: “For many years, U.S. forces referred to the al-Udeid Air Base as only being in Asia out of security concerns, suggesting the soldier in the video may have been making a joke about that.”

“The soldiers appear to be doing preparations for a video about an upcoming birthday ball event for the Army,” ventures The Washington Post. “The service celebrates its founding June 14.”