Chelsea Manning walked out of a U.S. military prison on Wednesday, seven years after being arrested for passing secrets to WikiLeaks in the largest breach of classified information in U.S. history.

Manning, 29, was released from the U.S. Disciplinary Barracks at Fort Leavenworth, Kansas, at about 2 a.m., the U.S. Army said in a brief statement.

"First steps of freedom!!" Manning wrote alongside a photograph of sneaker-clad feet that she published on social media.

Manning was convicted of providing more than 700,000 documents, videos, diplomatic cables and battlefield accounts to WikiLeaks, an international organization 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 Manning was freed. U.S. Attorney General Jeff Sessions has said Assange's arrest was a priority.

Former U.S. president Barack Obama, in his final days in office, commuted the final 28 years of Manning's 35-year sentence, effective four months later. That decision angered national security experts who say Manning put U.S. 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.

Manning announced her gender transition while the U.S. 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 U.S. Defense Department lifted a long-standing ban against transgender men and women serving openly in the military. The Pentagon estimated it affected 7,000 active-duty and reserve personnel.

Although transgender people still complain of widespread discrimination in education, employment and medical care, awareness of the issue has exploded since Manning went to jail. Transgender celebrities such as Caitlyn Jenner and Laverne Cox have become part of the mainstream.

"LOVE FOR MY COUNTRY"

In a statement to ABC News, 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."

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."

WikiLeaks began revealing secrets from anonymous sources in 2007 and then burst onto the wider public consciousness with a series of releases throughout 2010, including material gathered by Manning.

Among the material she leaked was a 2007 gunsight video of a U.S. Apache helicopter firing at suspected insurgents in Iraq, killing a dozen people, including two Reuters news staffers.

More recently, WikiLeaks published Democratic National Committee emails in the weeks leading up to the Nov. 8 U.S. presidential election. U.S. intelligence agencies have concluded the email accounts were hacked by Russian intelligence as part of a campaign by Moscow to influence the election.

On April 13, Central Intelligence Agency Director Mike Pompeo called WikiLeaks a "hostile intelligence service."

Assange has been at Ecuador's London embassy since 2012 to avoid extradition to Sweden, where he is wanted on suspicion of rape. Assange denies the allegations. He has said he fears Sweden would extradite him to the United States, where there is an open criminal investigation into the activities of WikiLeaks.