In a last minute action, President Barack Obama significantly commuted the sentence of incarcerated whistleblower Chelsea Manning.

The outgoing administration had been under enormous pressure to grant Ms Manning clemency before President-elect Donald Trump takes office. She was included in a list of 209 commutations and 64 pardons.

Ms Manning, 29, had been serving a 35-year sentence in a prison in Fort Leavenworth, Kansas, for leaking classified military and diplomatic documents.

She will be released on 17 May 2017.

Why was Chelsea Manning in prison?

Ms Manning was convicted of espionage and theft in July 2013 after leaking information obtained while serving as an intelligence analyst in the US Army in 2009. She was stationed at Forward Operating Base Hammer in Iraq, during which time she gained access to such classified information. Among the information that shocked Ms Manning was video depicting the US military killing unarmed civilians.

She passed along the information to Wikileaks founder Julian Assange in 2010 after failed attempts to contact the Washington Post and the New York Times. Wikileaks released video in April 2010 showing a US helicopter gunning down civilians – including a Reuters journalist – in Iraq.

Soldiers could be heard in the video, titled “Collateral Murder”, ridiculing the victims.

“The most alarming aspect of the video to me, however, was the seemingly delightful bloodlust the aerial weapons team,” Ms Manning said in a statement read in court. “They dehumanised the individuals they were engaging and seemed to not value human life by referring to them as ‘dead bastards’, and congratulating each other on the ability to kill in large numbers.”

Ms Manning, who was then known as “Bradley Manning”, revealed she was behind the leaks to former hacker Adrian Lamo in an online forum, under the handle “bradass87”. Mr Lamo subsequently turned her into the Department of Defense.

The DoD arrested Ms Manning in May 2010.

Gender identity

A day after her 2013 sentencing, Ms Manning announced her transgender identity in a statement given to NBC.

“As I transition into the next phase of my life, I want everyone to know the real me. I am Chelsea Manning. I am a female,” she said. “Given the way that I feel, and have felt since childhood, I want to begin hormone therapy as soon as possible. I hope that you will support me in this transition.”

She petitioned the court to be legally referred to as Chelsea Manning. The court granted the petition in 2014, and began undergoing hormone therapy.

Failed appeals and subsequent suicide attempts

Ms Manning filed an appeal to her sentence in May 2016. In an unclassified portion of her 250-page appeal, Ms Manning rebuked her sentencing as harsh and unjust.

“No whistleblower in American history has been sentenced this harshly,” she said, adding that the 35-year sentence is “perhaps the most unjust sentence in the history of the military justice system.”

Lead counsel for the Chelsea Manning Legal Defence Team called for the full overturn of Ms Manning’s punishment.

“A war against whistleblowers is being waged in this country and this case represents how this country treats anyone who reveals even a single page of classified information,” said attorney Nancy Hollander. “We need brave individuals to hold the government accountable for its actions at home and abroad and we call upon this court to overturn the dangerous precedent of Chelsea Manning’s excessive sentencing.”

Ms Manning attempted suicide twice in 2016 following her rejected appeal. After the first attempt in July, she faced disciplinary action and was sentenced to further solitary confinement. In October, when placed in solitary, she attempted to kill herself once more.

Clemency

The White House made the announcement of Ms Manning’s clemency Tuesday afternoon.