US President Barack Obama has slashed the prison sentence of Chelsea Manning, the former US army intelligence analyst jailed for leaking classified files to WikiLeaks.

Key points: Former US army intelligence analyst Manning was jailed for leaking files to WikiLeaks

Former US army intelligence analyst Manning was jailed for leaking files to WikiLeaks Mr Obama, in the last days of his presidency, has slashed Manning's sentence from 35 years to less than four

Mr Obama, in the last days of his presidency, has slashed Manning's sentence from 35 years to less than four Commuting of Manning's sentence sparks speculation about Julian Assange's future

Manning was serving a 35-year sentence, but will now be released on May 17, the White House said.

The former army private leaked hundreds of thousands of military incident logs, which detailed the abuse of detainees and an increase in civilian deaths during the Iraq war, to the WikiLeaks website.

It was the biggest breach of classified materials in US history.

She was known as Bradley Manning at the time of her 2010 arrest but was allowed to receive gender transition surgery while in prison.

Manning, who is held at a military prison in Kansas, has tried to kill herself twice while behind bars.

Chase Strangio, an American Civil Liberties Union attorney representing Manning, said the President's action had "quite literally saved Chelsea's life".

"We are all better off knowing that Chelsea Manning will walk out of prison a free woman, dedicated to making the world a better place and fighting for justice for so many," he said in a statement.

The commuting of Manning's sentence will no doubt spark speculation about the future of WikiLeaks' founder Julian Assange.

Mr Assange has been holed up for four years inside the Ecuadorian embassy in London to avoid extradition to Sweden, where authorities are investigating sexual assault allegations against him.

He has refused to travel to Sweden, saying he fears being extradited to the US over his involvement in publishing classified documents.

But last week the official Twitter account of WikiLeaks said:

Loading

Following the President's grant of clemency for Manning, Mr Assange's lawyer said he remained in the embassy.

"We have repeatedly, through our US counsel, asked DOJ [the Department of Justice] to clarify Mr Assange's status and we would like them to do so now by announcing it is closing the investigation and pursuing no charges," lawyer Jennifer Robinson said.

In a statement Mr Assange welcomed Mr Obama's decision but said Manning "should never have been convicted in the first place".

"Ms Manning is a hero, whose bravery should have been applauded not condemned," he said.

"Journalists, publishers, and their sources serve the public interest and promote democracy by distributing authentic information on key matters such as human rights abuses, and illegal acts by government officials.

"They should not be prosecuted. In order for democracy and the rule of law to thrive, the Government should immediately end its war on whistleblowers and publishers, such as WikiLeaks and myself."

A White House official said the President's decision was not influenced in any way by WikiLeaks or Mr Assange.

Snowden welcomes news, but Republicans call it 'outrageous'

Edward Snowden, who fled the US in June 2013 after leaking classified documents that revealed domestic telephone metadata was being collected by security agencies, welcomed Manning's news.

Things to know about Manning Born in Crescent, Oklahoma, as Bradley Manning, she became Chelsea Manning in August 2013

Born in Crescent, Oklahoma, as Bradley Manning, she became Chelsea Manning in August 2013 Worked in Iraq as a US intelligence analyst from 2009

Worked in Iraq as a US intelligence analyst from 2009 She leaked hundreds of thousands of military incident logs — the biggest breach of classified materials in US history

She leaked hundreds of thousands of military incident logs — the biggest breach of classified materials in US history She began hormone replacement therapy while in custody

She began hormone replacement therapy while in custody Manning twice tried to kill herself while at military prison in Kansas

Manning twice tried to kill herself while at military prison in Kansas Described as "a hero" by WikiLeaks founder Julian Assange

"In five more months, you will be free. Thank you for what you did for everyone, Chelsea. Stay strong a while longer," he tweeted.

But Republican House Speaker Paul Ryan called the President's decision "just outrageous".

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

He also said Mr Obama was setting "a dangerous precedent that those who compromise our national security won't be held accountable for their crimes".

Manning was one of 209 inmates whose sentences the President was shortening.

With his term in the White House due to end on Friday, Mr Obama also pardoned 64 individuals.

The White House said Mr Obama had commuted the sentences of 1,385 individuals in total — the most by any president in the nation's history.

The President has also granted a total of 212 pardons, including the latest cases.

ABC/wires