President Trump blasted Chelsea Manning in an early morning tweet Thursday, calling the convicted Army leaker an “ungrateful TRAITOR” who he said should “never have been released from prison.”

The president also charged that Manning had called former President Obama a “weak leader,” though the transgender soldier -- whose prison commutation was one of Mr. Obama’s last acts in the Oval Office -- didn’t exactly say that.

Ungrateful TRAITOR Chelsea Manning, who should never have been released from prison, is now calling President Obama a weak leader. Terrible! — Donald J. Trump (@realDonaldTrump) January 26, 2017

Mr. Trump seemed to be referring to an op-ed Manning wrote in The Guardian on Wednesday, which called for an “unapologetic progressive” to lead the country, following the former president’s “vulnerable” legacy.

Get Breaking News Delivered to Your Inbox

“Optimism and hope would be met with backlash and hate,” Manning wrote of Obama’s time in office. “He faced unparalleled resistance from his opponents, many of whom wanted him to fail.”

The lesson to be learned, Manning said, was “do not start off with a compromise.”

“They won’t meet you in the middle,” she wrote. “Instead, what we need is an unapologetic progressive leader.”

Manning had previously expressed gratitude to the former president after news that her 35-year prison sentence would be commuted by Obama.

In a tweet last week, Manning thanked Obama “for giving me a chance.”

Thank you @BarackObama for giving me a chance. =,) — Chelsea Manning (@xychelsea) January 19, 2017

It’s unclear what prompted Mr. Trump’s early Thursday tweet lambasting the former soldier, who had been convicted of leaking classified military and State Department documents and videos to the infodumping website WikiLeaks. (Mr. Trump has himself been critical of leaks of government information but has also encouraged WikiLeaks after the site released private email correspondences from his rival Hillary Clinton’s campaign staff.)

The president’s short Twitter message came shortly after a Fox News panel discussion aired on the topic, where a commentator described Obama “as a weak leader with few permanent accomplishments.”

CNN’s Brian Stelter pointed to the timing of the Fox News segment and Mr. Trump’s tweet:

14 minutes apart: Fox says "ungrateful traitor," Trump says "ungrateful traitor," Fox says "weak leader," Trump says "weak leader." pic.twitter.com/f7urTOUG1L — Brian Stelter (@brianstelter) January 26, 2017

Manning is expected to be freed in May of 2017.