A former Malian government official claimed responsibility Tuesday for embarrassing tweets from the president's account which labelled the US assassination of Iranian commander Qassem Soleimani as a "fuck-up".
Malian President Ibrahim Boubacar Keita's official Twitter account had posted Monday that "no one is around to tell Trump that he committed a fuck-up" by ordering the assassination.
Soleimani was killed on Friday in a US drone strike in Iraq ordered by President Donald Trump, triggering fears of a retaliatory strike and an escalation of conflict in the Middle East.
The Malian presidency account added that Trump "threatens world peace and has made of the US a rogue state".
The tweets, which have since been deleted, were widely shared.
But the government walked back from the comments on Monday night, saying the account had been "temporarily pirated by ill-intentioned individuals" and calling the posts "an unfortunate mistake".
The author of the affair turned out to be a former spokesperson for Keita, Tiegoum Maiga, who outed himself on his own Twitter account.
"It was neither pirates, nor hackers, (but) a regrettable handling error," he said.
Maiga, also the brother of former Malian Prime Minister Soumeylou Boubeye Maiga, said he left his job in November but had forgotten he still had access to the president's account.
His tweets were meant for his personal account and he had "no desire to be a nuisance," Maiga said.
The US also suffered a PR fiasco on Monday, when it said a draft letter describing steps to move its military out of Iraq had been mistakenly sent out.