The president calls Manning an "ungrateful traitor" for her critique of Barack Obama, just minutes after those words appeared on Fox News.

Donald Trump has called Chelsea Manning an “ungrateful traitor,” apparently in response to a commentary piece she wrote that is critical of Barack Obama, and using words that had appeared on Fox News minutes before he tweeted them.

In one of his final acts as president, Obama last week commuted most of Manning’s remaining sentence for providing secret government documents to WikiLeaks when she was an Army intelligence specialist. She will be freed in May, after seven years in a military prison; if she had served her full 35-year sentence, she would have been imprisoned until 2045. The more common sentence for leakers is one to three years.

Manning had tweeted her gratitude to Obama shortly thereafter, but she did take him to task as insufficiently progressive in a commentary published Wednesday in London’s Guardian newspaper. However, she was much rougher on his opponents.

“Barack Obama left behind hints of a progressive legacy,” she wrote. “Unfortunately, despite his faith in our system and his positive track record on many issues over the last eight years, there have been very few permanent accomplishments.”

“What we really need is a strong and unapologetic progressive to lead us,” she continued. “What we need as well is a relentless grassroots movement to hold that leadership accountable.” She noted that Obama attempted to compromise with Republicans but “faced unparalleled resistance from his opponents, many of whom wanted him to fail.”

“For eight years, it did not matter how balanced President Obama was,” Manning wrote. “It did not matter how educated he was, or how intelligent he was. Nothing was ever good enough for his opponents. It was clear that he could not win. It was clear that, no matter what he did, in their eyes, he could not win.”

Manning, who is transgender, further critiqued the former president for his response to the mass shooting at the Pulse gay nightclub in Orlando, saying, “It took Obama over 300 words of his speech to acknowledge the queer community, and even then, as an abstract acronym.”

Nowhere did she use the words “weak leader” to describe Obama, but the new president asserted that she did, tweeting the following:

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

Fox News host Abby Huntsman had paraphrased Manning’s words in that fashion early Thursday morning, just 14 minutes before Trump tweeted, Mediaite reports. “The disgraced former Army private is slamming President Obama as a weak leader with few permanent accomplishments,” Huntsman said of the Guardian piece. And Fox had superimposed the words “ungrateful traitor” on an image of Manning.

“Trump, who is known for getting his news from cable television, particularly Fox, tweeted using the same ‘ungrateful traitor’ and ‘weak leader’ language,” the Guardian notes, citing the Mediaite report. “This is the third such instance of Trump echoing Fox News coverage recently: Trump’s tweet about threatening to ‘send in the feds’ to eliminate Chicago’s gun violence on Tuesday, and about flag-burning in November, also followed Fox News segments on those same subjects.”

Mediaite adds, “By now, it is a sure-fire bet that when President Donald J. Trump awakens in the early morning hours and sends out another seemingly unprovoked Tweet, it likely comes in response to a segment he just finished watching on cable news.”