Image copyright Getty Images

The US army private serving a 35-year prison sentence for leaking classified documents has thanked President Barack Obama for shortening her sentence.

Chelsea Manning, whose sentence was commuted by the outgoing president, thanked him "for giving me a chance".

The 29-year-old transgender soldier, born Bradley Manning, gave embarrassing documents to Wikileaks in 2010.

At President Obama's final press conference on Wednesday, he declared that "justice has been served".

She will be freed from the Fort Leavenworth military prison in May - 29 years ahead of her scheduled release in 2045.

Wikileaks founder Julian Assange weighed in on Thursday, insisting that he would stand by his offer to be extradited to the US as long as his rights were protected.

Mr Assange, who agreed to be extradited to the US if Mr Obama granted clemency to Manning, has been holed up at the Ecuadorian embassy in London since 2012.

The Australian national sought refuge there to avoid extradition to Sweden, where he is wanted for questioning in relation to an alleged sex offence.

"I stand by everything I said including the offer to go to the United States if Chelsea Manning's sentence was commuted," he said in a live online audio news conference on Thursday.

"It's not going to be commuted (until) May. We can have many discussions to that point," he added.

The White House said Manning's commutation had not been influenced in any way by Mr Assange's offer, and the US justice department has not indicted Mr Assange nor publicly sought his extradition.

Obama says justice is served

Viewpoint: Obama got it right

Image copyright Twitter Image caption Manning dictates Tweets by dictating text to a friend over the phone

Mr Obama's last-minute commutation quickly drew criticism from Republican circles.

A spokesman for president-elect Donald Trump said he "is troubled by this action. It's disappointing and it sends a very troubling message when it comes to the handling of classified information".

Republican Speaker of the House Paul Ryan called the decision "outrageous".

"Chelsea Manning's treachery put American lives at risk and exposed some of our nation's most sensitive secrets," Mr Ryan said.

Manning does not have access to the internet, as part of the condition of her imprisonment.

However despite that, she has been tweeting from @xychelsea since April 2015.

In a handwritten letter she released to explain her social media use, she told how she calls a friend on the phone who transcribes what she says "verbatim".

Her thank you was addressed to @BarackObama, rather than the President's official @POTUS Twitter account, which Mr Obama will hand over to Mr Trump on Friday when he officially becomes the nation's 45th president.