Senior Republican officials have condemned President Barack Obama's decision to shorten the prison sentence of Chelsea Manning, a former military intelligence analyst responsible for a major information leak in 2010.

Manning was convicted in July 2013 for leaking classified materials to whistleblower website WikiLeaks, the biggest such security breach in US history.

Obama, in one of his final acts before leaving office, reduced her sentence to seven years. The White House said her sentence would end on May 17 this year.

House Speaker Paul Ryan called the move "outrageous" in remarks quoted by national media.

READ MORE: Obama cuts short Chelsea Manning's prison sentence

"Chelsea Manning's treachery put American lives at risk and exposed some of our nation’s most sensitive secrets. President Obama now leaves in place a dangerous precedent that those who compromise our national security won’t be held accountable for their crimes," the Republican House member said.

Senator John McCain, the chairman of the Senate Armed Services Committee, was quoted as saying that Obama was making "a grave mistake" that might "encourage further acts of espionage and undermine military discipline.

"It also devalues the courage of real whistleblowers who have used proper channels to hold our government accountable," he added.

Another Republican Senator, Tom Cotton, said the leak endangered troops, intelligence officers, diplomats and allies.

"We ought not to treat a traitor like a martyr," Cotton said.

'Thanks, Obama'

Earlier on Tuesday, a White House official said there was no connection between Manning's commutation and renewed US government concern about WikiLeaks' actions during last year's presidential election, or a promise by founder Julian Assange to accept extradition to the US if Manning was freed.

The official said Obama's decision was rooted in Manning's sentence being longer than sentences given to others who had committed comparable crimes.

Obama, who leaves office on Friday and is scheduled to give his final news conference on Wednesday, is expected to discuss his decision then.

Obama granted 209 commutations and 64 pardons to convicted prisoners on Tuesday.

READ MORE: Chelsea Manning attempted suicide

Manning has been a focus of a worldwide debate on government secrecy since she provided more than 700,000 documents, videos, diplomatic cables and battlefield accounts to WikiLeaks - a leak for which she was sentenced to serve 35 years in prison.

The whistleblower, formerly known as US Army Private First Class Bradley Manning, was born male but revealed after being convicted of espionage that she identifies as a woman.

Manning, who twice tried to kill herself last year and has struggled to cope as a transgender woman in the Fort Leavenworth, Kansas, men's military prison, accepted responsibility for leaking the material - a factor that fed into Obama's decision, a White House official told reporters, speaking on condition of anonymity.

WikiLeaks celebrated Obama's decision by releasing a series of tweets, one of which stated: VICTORY: Obama commutes Chelsea Manning sentence from 35 years to 7. Release date now May 17.

On Twitter last week, WikiLeaks posted: "If Obama grants Manning clemency Assange will agree to US extradition despite clear unconstitutionality of DoJ case."

Obama's move will test the promise.

In a statement, Assange called Manning "a hero, whose bravery should be applauded".

Assange went on to demand that the US government "should immediately end its war on whistleblowers and publishers, such as WikiLeaks and myself", but he made no mention of the Twitter pledge.

His lawyer said he has been pressing the Justice Department for updates on an investigation concerning WikiLeaks.

Assange has been holed up for more than four years at the Ecuadorian Embassy in London. He has refused to meet prosecutors in Sweden, where he remains wanted on an allegation of rape, fearing he would be extradited to the US to face espionage charges if he leaves the embassy.

In a reaction to the shortening of Manning's sentence, Human Rights Watch director in Australia, Elaine Pearson, on Twitter called for the US to drop the case against the WikiLeaks founder.

"After Manning's pardon, US case against Assange should also be dropped. Espionage Act shouldn’t be used to punish those who publish leaks."

Whistleblower Edward Snowden, who leaked classified information about US spying methods to the press, also took to Twitter, celebrating the shortening of Manning's sentence.

In five more months, you will be free. Thank you for what you did for everyone, Chelsea. Stay strong a while longer! https://t.co/PaLvJDvDbl

— Edward Snowden (@Snowden) January 17, 2017

In a later tweet Snowden wrote; Let it be said here in earnest, with good heart: Thanks, Obama.