Chelsea Manning was a meek, geeky Army private who stunned the world in 2010 by leaking a massive trove of secret US diplomatic records, hoping to spark debate over the country's role in wars.
But she exited military prison Wednesday after serving seven years for her crime equally known for a heartbreaking, ultimately triumphant struggle with her gender during her time in jail.
The former Private Bradley Manning, 29, survived two suicide attempts and the US military's conservative views on gender while serving a 35-year sentence for espionage for handing over hundreds of thousands of pages of US diplomatic communications and other records to WikiLeaks in 2010.
She maintained that she never intended to hurt US interests, and her sentence was commuted by outgoing President Barack Obama in January, who called the punishment "very disproportionate" to the crime.
Born a male in a small rural Oklahoma town, Manning grew up in Wales after her parents divorced; Manning's father kicked her out of the house when he learned of his child's sexual orientation.
She developed a talent in computing, and after finishing school, joined the US Army in 2007. She has said she thought of herself as female since she was young, and struggled in the macho environment of the military. At the time, she was subject to the military's ban on openly gay troops, known as "Don't Ask, Don't Tell."
Prison gender change
After basic training she was assigned to an intelligence unit and in 2009 was sent to Iraq, deploying to a base near Baghdad where she was given access to a broad set of US intelligence on the military's classified computer network.
She began downloading files, including an explosive video of a US helicopter gunship mowing down Iraqi civilians two years earlier, documents on US treatment of detainees in the military prison in Guantanamo Bay, and more secret documents on the wars in Afghanistan and Iraq.
Detained in May 2010 over the initial leaks, she later admitted to downloading some 700,000 sensitive files and turning them over to WikiLeaks.
"I want people to see the truth... because without information, you cannot make informed decisions as a public," she confided in online chats with a former hacker who reported her to authorities.
But Manning's trial and imprisonment brought out the dramatic struggle she had over her gender.
After she was convicted and sentenced in 2013, she announced she was a female and requested medical treatment — including hormone therapy — to enable her to become a woman.
In a path-breaking legal battle in military courts, she won the support of judges to be referred to as a woman, and to receive therapy for so-called gender "reassignment."
But rules at the Ft. Leavenworth, Kansas military prison were still tough. Though permitted to wear women's undergarments, she was forbidden to grow her hair long.
And in court she was still referred to as "he" with regard to any proceedings prior to her official name change.
"I am torn up," she said in a 2015 interview with Cosmopolitan magazine. "I get through each day OK, but at night, when I'm alone in my room, I finally burn out and crash."
But she also said she found support in letters from transgender people around the world.
Her stress over the gender shift led to two suicide attempts in 2016. In September, Manning began a hunger strike to protest what she said was the military's refusal to treat her gender dysphoria.
'First steps to freedom'
While her leaking secret documents to WikiLeaks still garners tough criticism in US military and intelligence circles, Obama said on Jan. 18 that justice had been adequately served by her seven years behind bars.
"It has been my view that given she went to trial, that due process was carried out, that she took responsibility for her crime, that the sentence that she received was very disproportionate relative to what other leakers had received, and that she had served a significant amount of time, that it made sense to commute and not pardon her sentence," he said.
Newly free, in her first public act Wednesday Manning posted a photograph on social media of her feet in brand-new black Converse All-Stars, saying: "First steps of freedom!!"
A post shared by Chelsea E. Manning (@xychelsea87) on