Chelsea Manning has walked out of a US military prison on Wednesday, seven years after being arrested for passing secrets to WikiLeaks in the largest breach of classified information in US history.
Manning, 29, was released from the US Disciplinary Barracks at Fort Leavenworth, Kansas, at about 2am, the US Army said in a brief statement.
"First steps of freedom!!" Ms Manning wrote alongside a photograph of sneaker-clad feet that she published on social media.
Ms Manning was convicted of providing more than 700,000 documents, videos, diplomatic cables and battlefield accounts to WikiLeaks, an international organisation that publishes such information from anonymous sources, while she was an intelligence analyst in Iraq.
WikiLeaks founder Julian Assange, a target of criminal investigations in Sweden and the United States, had promised to accept extradition if Ms Manning was freed. US Attorney General Jeff Sessions has said Assange's arrest was a priority.
Former US President Barack Obama, in his final days in office, commuted the final 28 years of Ms Manning's 35-year sentence, effective four months later. That decision angered national security experts who say Ms Manning put US lives at risk, but it won praise from transgender advocates who have embraced her transition to a female gender identity.
Once known as Private First Class Bradley Manning, she is likely to become a high-profile transgender advocate, said Chase Strangio, an American Civil Liberties Union lawyer who has represented her.
Ms Manning announced her gender transition while the US Army was keeping her in the men's prison and forcing her to wear a male haircut. She twice tried to commit suicide and faced long stretches of solitary confinement as well as denial of healthcare, Strangio said.
Last year, the US Defense Department lifted a long-standing ban against transgender men and women serving openly in the military. The Pentagon estimated it affected 7000 active-duty and reserve personnel.
In a statement to ABC News, Ms Manning said she appreciated the support she had received from people all over the world.
"As I rebuild my life, I remind myself not to relive the past," the statement said. "The past will always affect me, and I will keep that in mind while remembering that how it played out is only my starting point -- not my final destination."
Ms Manning said in 2014 that she disclosed the classified information to expose truths about the civil war in Iraq "out of a love for my country".