President Donald Trump gloated in a tweet Saturday that he fired Michael Flynn because he knew his national security adviser had lied to the FBI. If that was the case, Trump’s reported attempt to stop former FBI Director James Comey’s investigation of Flynn could constitute obstruction of justice, legal experts warned.

The tweet was apparently triggering enough concern that the president’s personal attorney John Dowd came forward late Saturday to tell ABC News that he had actually written the tweet, which he called “sloppy.” The Washington Post also reported that two unnamed sources told the newspaper that Dowd was responsible for the message. The White House hasn’t commented.

I had to fire General Flynn because he lied to the Vice President and the FBI. He has pled guilty to those lies. It is a shame because his actions during the transition were lawful. There was nothing to hide! — Donald J. Trump (@realDonaldTrump) December 2, 2017

Rep. Ted Lieu (R-Calif.) was among those who blasted the tweet, assuming it was penned by Trump and saying flatly: “This is obstruction of justice.”

THIS IS OBSTRUCTION OF JUSTICE. @POTUS now admits he KNEW Michael Flynn lied to the FBI. Yet Trump tried to influence or stop the FBI investigation on #Flynn. https://t.co/8JqGBxgou0 — Ted Lieu (@tedlieu) December 2, 2017

“Oh my god,” tweeted Matthew Miller, a former Department of Justice official. “He just admitted to obstruction of justice.”

Oh my god, he just admitted to obstruction of justice. If Trump knew Flynn lied to the FBI when he asked Comey to let it go, then there is your case. https://t.co/c6Wtd0TfzW — Matthew Miller (@matthewamiller) December 2, 2017

Obama administration ethics chief Walter Shaub and Richard Painter, the top ethics lawyer during President George W. Bush’s administration, were also stunned by the tweet on @realDonaldTrump.

...just couldn't resist commenting on Flynn.



Are you ADMITTING you knew Flynn had lied to the FBI when you asked Comey to back off Flynn??????????????????????????????????????????? https://t.co/HJWlUvC99F — Walter Shaub (@waltshaub) December 2, 2017

He could be Tweeting himself into an obstruction of justice conviction

https://t.co/LDjAGhb6qj — Richard W. Painter (@RWPUSA) December 2, 2017

Attorney Michael Waldman of the Brennan Center for Justice at New York University quipped on MSNBC that Trump was going to “regret that Twitter expanded to 280 characters, giving him more room to confess to obstruction of justice in his tweets.”

Trump “just said that Michael Flynn lying to the FBI was one of the reasons he fired him,” Waldman added. “Broaden the time horizon: He then asked the then-director of the FBI to drop the investigation — and then he fired the director of the FBI.”

Even Comey posted one of his mysterious zen-like social media comments in an apparent response to Trump’s tweet.

‪Beautiful Long Island Sound from Westport, CT. To paraphrase the Buddha — Three things cannot be long hidden: the sun; the moon; and the truth. ‬ A post shared by James Comey (@comey) on Dec 2, 2017 at 10:56am PST

The White House said in a statement in February that Flynn was asked to resign because of “eroding trust.” Nothing was said about lies to the FBI.

“There is not a legal issue, but rather a trust issue,” then-White House spokesman Sean Spicer said.

When Flynn stepped down, he apologized for providing “incomplete information” to Vice President-elect Mike Pence concerning a conversation he had last December with Russian ambassador Sergey Kislyak. On Friday, Flynn pleaded guilty to lying to FBI agents about that conversation, which included a discussion of sanctions the Obama administration imposed on Russia for interfering in the U.S. presidential election.

Comey testified before Congress in June that Trump tried to call him off an investigation of Flynn on Feb. 14, the day after Flynn resigned. “I hope you can see your way clear to letting this go, to letting Flynn go,” Comey quoted the president as saying in his written testimony. “He is a good guy. I hope you can let this go.”

Comey said he “replied only that ‘he is a good guy.’ I did not say I would ‘let this go.’”

Trump fired Comey on May 9. The president reportedly told visiting Russian officials in the Oval Office days later that he axed his “nut job” FBI director, saying it eased the “great pressure” he felt because of the investigation into Kremlin interference in the U.S. presidential election, according to The New York Times.

This story has been updated to include an ABC News report that quoted Trump’s personal attorney John Dowd as saying he was responsible for the president’s tweet.