Whistleblower Chelsea Manning is a person of conscience and bravery who has withstood the most humiliating of punishments. If anyone can claim to have spoken truth to power and suffered the consequences, it’s her.

From 2007 to 2009, Manning, an intelligence analyst for the US military, had access to tens of thousands of documents that detailed the nature of the US wars of occupation in Afghanistan and Iraq. As she trawled through video, statistics and data, she had a revelation:

“Once you come to realise that the co-ordinates in these records represent real places, that the dates are our recent history and that the numbers represent actual human lives – with all of the love, hope, dreams, hate, fear and nightmares with which we all live – then you cannot help but be reminded just how important it is for us to understand and, hopefully, prevent such tragedies in the future.”

Manning began to see through the fog of impersonal statistics to the brutal reality of the occupations. She began to comprehend the levels of barbarism involved in “21st century asymmetric warfare”. She saw that the torture and murder of civilians were fundamental elements of these wars.

Furthermore, she began to understand the impunity with which the US military operated. War crimes were committed and systematically covered up with lies and deception. For Manning, it was too much. Her conscience would not allow compliance. She decided to act. In November 2009, Manning reached out to several news sources, including the New York Times, the Washington Post and the whistleblower site WikiLeaks, to see whether they would be prepared to publish files documenting US war crimes in Iraq and Afghanistan. Only WikiLeaks expressed interest.

In early 2010, Manning downloaded 400,000 documents that became known as the Iraq War logs, and 91,000 documents from the Afghanistan database. She smuggled these out of her base on a CD she had titled “Lady Gaga”. The files were transferred to an SD card. While on leave in Maryland, she went to a Barnes & Noble bookstore and uploaded the files to WikiLeaks.

WikiLeaks then proceeded to release the information. The first high profile release featured video of a US helicopter attack in Baghdad in July 2007. The attack killed 12 people, including two Reuters journalists. The footage was particularly shocking because it contained audio of the helicopter gunmen revelling in the attack. As one of them opens fire, he yells, “Hahaha. I hit ’em!” and “Oh yeah, look at those dead bastards”. As other civilians rush in to help the wounded, one of the helicopters starts shelling again.

In July and November 2010, two further tranches of material were released. One focused on Afghanistan, the other on Iraq. Not only did these files reveal further massacres; they also demonstrated that US authorities knew about them and did nothing.

Another set of documents revealed that the Iraqi army, with the knowledge of the US authorities, had been engaging in systemic torture of prisoners, who had been “shackled, blindfolded and hung by wrists or ankles, and subjected to whipping, punching, kicking or electric shocks”.

The leaks, published by the Guardian, revealed other important information. For instance, the US and its allies had long maintained that there were no hard statistics on the number of casualties in Iraq. Manning’s leaks put paid to that lie. The field reports revealed that between 2004 and 2009 there was a total of 109,000 violent deaths in Iraq.

More than 66,081 of these were non-combatant deaths. These staggering figures underlined the depths of barbarism associated with the war. Manning’s leaks played a vital role in exposing the lie that the Iraq was a war of liberation. In fact, it was a violent war of occupation in the service of empire.

The November cache of secret diplomatic cables not only revealed deep levels of corruption among the US ruling class; they also demonstrated the extent to which companies and governments across the Middle East were pilfering public money, engaging in underhand deals and making billions of dollars in the process. The information in these files added fuel to the fire of the Arab revolutions the following year. Here was hard evidence of the contempt the rich and powerful held for their own populations.

The Manning leaks caused a global furore and left the US ruling class scrambling. Its mask of civility had slipped. The brutal reality of war, occupation and empire was on full display. This was something the US state could not abide. Capitalism maintains itself through a pretence of law, order and morality. The ruling class claims that its system is rational and humane, but when evidence proves the contrary, someone has to pay a price. In this instance it was Chelsea Manning.

After the release of the Iraq War logs, Manning was taken into military custody. She was flown from Operating Base Hammer outside Baghdad to a prison camp in Kuwait. In this scorching, sandblasted place she was locked in a cage inside a tent. In July, she was charged with leaking information and transferred to a military prison at Quantico, Virginia. This was where the torture really began.

The New York Times reported that Manning was humiliated and degraded. They revealed that the guards had stripped her and left her naked in her cell “for seven hours”, and that she was “required to stand naked” outside her cell during inspection.

She was put into solitary confinement and was under constant surveillance. Investigative journalist Glenn Greenwald declared that Manning was being imprisoned “under conditions that constitute cruel and inhumane treatment and, by the standards of many nations, even torture”.

In 2011, Manning’s first pre-trial hearing began. She spent two long years in military prison before her case was heard in 2013. For nine months of this time, she was kept in solitary confinement.

The UN special rapporteur who wrote on her imprisonment in 2012 said: “[I]mposing seriously punitive conditions of detention on someone who has not been found guilty of any crime is a violation of his right to physical and psychological integrity as well as of his presumption of innocence”.

Accompanying this physical torture was a campaign of public vilification. News outlets pilloried Manning as a traitor. Right wing shock jocks called for her execution. President Barack Obama, the darling of liberals everywhere, declared that Manning had broken the law and had to face the consequences.

She was prosecuted under the 1917 Espionage Act, which allows whistleblowers to be given the harshest of punishments. Manning pleaded guilty to leaking military information, but not guilty to other charges, including “aiding the enemy”. These crimes carried a maximum punishment of life imprisonment.

On 21 August, Manning was found guilty of violating the Espionage Act and was sentenced to 35 years in the Fort Leavenworth prison in Kansas. Greenwald’s description of visiting Manning in prison gave a glimpse of how isolated she was from the rest of the world:

“In 2015, I visited her at Fort Leavenworth. To get there, one must fly to Kansas City, then drive more than an hour into the woods of Kansas, in the proverbial middle of nowhere. One arrives at a sprawling, completely militarised base, Fort Leavenworth, where it was quite difficult to gain access.

“Upon entering, one drives another 15 to 20 minutes deep into the military base to arrive at the military brig, which itself is a labyrinth of cages and security measures that must be navigated in order to finally meet her somewhere in the bowels of that prison.”

The day after her conviction, Manning announced to the world that she no longer identified as Bradley Manning and requested that she be supported to undergo treatment to transition from male to female. “Given the way that I feel, and have felt since childhood, I want to begin hormone therapy as soon as possible”, she wrote. “I hope that you will support me in this transition. I also request that, starting today, you refer to me by my new name and use the feminine pronoun.”

To begin such a transition is difficult in the best of circumstances, with the most supportive of colleagues, friends or family. To attempt it in an intensely regulated, abusive and isolated environment requires a special kind of strength.

Unsurprisingly, the military was not going to grant Manning hormone therapy without a fight. Manning organised a petition campaign from prison and went on hunger strike. The prison authorities became more and more hostile. To break her spirit, they put her under constant surveillance. She described the experience:

“For 17 hours a day, I sat directly in front of at least two Marine Corps guards seated behind a one-way mirror. I was not allowed to lay down. I was not allowed to lean my back against the cell wall. I was not allowed to exercise. Sometimes, to keep from going crazy, I would stand up, walk around, or dance, as ‘dancing’ was not considered exercise by the Marine Corps.”

She became so disillusioned and desperate that she attempted suicide. As one article commented, the military authorities punished her for trying to live and also for trying to die. In the wake of her suicide attempt she was threatened with indefinite solitary confinement.

The campaign outside the prison stepped up the pressure and, in 2016, the army finally agreed to some of her demands. She was allowed the hormone therapy but they forcibly shaved her head to prevent her from growing her hair.

While in prison, Manning kept up her engagement with the outside world. She wrote a regular column for the Guardian, in which she commented on a variety of issues. She became an active and outspoken campaigner for LGBTI rights. Her writing reveals a person of political commitment. She wasn’t naive. She knew the consequences. She claimed that she wanted to release the documents to prompt “worldwide discussion, debates, and reforms”. “I want people to see the truth, regardless of who they are, because without information, you cannot make informed decisions as a public”, she wrote.

Just before the end of his term, Obama commuted her sentence. This was welcome, but in no way makes up for the years of overseeing her imprisonment and torture. Furthermore, Obama cannot be allowed off the hook for the crucial role he played in continuing the occupation of Afghanistan and in fomenting sectarian tension in Iraq.

Since her release, Manning has continued her political engagement. In a recent piece on the legacy of the Obama years, she comments on the necessity of an uncompromising politics:

“We need someone who is unafraid to be criticised, since you will inevitably be criticised. We need someone willing to face all of the vitriol, hatred and dogged determination of those opposed to us. Our opponents will not support us nor will they stop thwarting the march toward a just system that gives people a fighting chance to live. Our lives are at risk – especially for immigrants, Muslim people and black people.

“We need to stop asking them to give us our rights. We need to stop hoping that our systems will right themselves. We need to actually take the reins of government and fix our institutions. We need to save lives by making change at every level.”

Chelsea Manning’s story of self-sacrifice and unyielding persistence should steel the rest of us in our fight for a better world. If someone buried in the dungeons of US military prisons can fight their way to clear air, then we can too. If Manning could take the path of humanity and justice, despite the personal risk she faced, then so can the rest of us.