Donald Trump has described Chelsea Manning as an "ungrateful traitor" in his first response since she had her prison sentence commuted by former US President Barack Obama.

One of the most prominent whistleblowers in recent American history, Manning was sentenced to 35 years in a military prison for leaking a trove of state secrets to the website WikiLeaks.

The leaks provided an unprecedented insight into the conduct of the American armed forces in Iraq and Afghanistan. Mr Obama drastically cut her sentence in one of his final acts as President, and she is due to be released in May.

Writing on Twitter, Mr Trump said: "Ungrateful TRAITOR Chelsea Manning, who should never have been released from prison, is now calling President Obama a weak leader. Terrible!"

That was a reference to a new column in the Guardian written by Manning, in which she criticised Mr Obama as a President with "few permanent accomplishments".

She wrote: "The one simple lesson to draw from President Obama’s legacy: do not start off with a compromise.

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

Earlier this week, Julian Assange claimed Mr Obama had only granted clemency to Manning to "make life hard for" the WikiLeaks founder.