Chelsea Manning has been released from prison after being convicted of passing classified information to WikiLeaks.

Ms Manning served seven years of her 35-year sentence, which was commuted by Barack Obama as one of his final acts as President.

Donald Trump called the former intelligence analyst an “ungrateful traitor” following the decision, claiming she “should never have been released from prison”.

“I appreciate the wonderful support that I have received from so many people across the world over these past years,” Ms Manning told ABC News.

“As I rebuild my life, I remind myself not to relive the past.

“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.”

A spokesperson for the US Army confirmed to the BBC that Ms Manning had left Fort Leavenworth military prison in Kansas on Wednesday.

In her final tweet before leaving jail, Ms Manning said she was looking forward to “the freedom of civilian life”, before taking a swipe at Donald Trump’s healthcare policy.

Obama uses final news conference to defend Chelsea Manning decision

“The nightmare will end, soon,” Ms Manning added, previously saying she planned to move to Maryland.

After being arrested in 2010, she filed a transgender rights case in prison and attempted suicide twice last year, according to her lawyers.

They refused to give details of how she would be freed over security concerns for the transgender soldier, who was known as Bradley Manning before transitioning in prison.

She was convicted in 2013 of 20 charges, including six Espionage Act violations, theft and computer fraud, but was acquitted of the most serious charge of aiding the enemy.

The diplomatic cables and military files she passed to WikiLeaks, gained on assignment as an Army intelligence analyst, exposed abuses in Iraq and Afghanistan by the American military and provoked global outrage.

They included secret documents on the treatment of detainees at Guantanamo Bay, killings by military contractors in Iraq, civilian deaths in Afghanistan and individual incidents including the killing of two Reuters war correspondents in Baghdad.

Ms Manning said she wanted to expose the US military's alleged disregard of the effects of war on civilians and chose to release information that she believed would not harm the US.

Wikileaks founder Julian Assange has sought asylum in the Ecuadorian Embassy (PA) (PA Wire/PA Images)

Critics said the leaks laid bare some of the nation's most-sensitive secrets and endangered information sources, prompting the State Department to move to protect their safety.

Several ambassadors were recalled, expelled or reassigned because of embarrassing disclosures.

Mr Obama's decision to commute Ms Manning's sentence to about seven years, including the time she spent in custody before being convicted, drew strong criticism from some American politicians including Republican House Speaker Paul Ryan, who called the move “outrageous”.

The Obama administration argued the case was fundamentally different to that of former National Security Agency contractor Edward Snowden, who fled to Russia after leaking documents on its secretive spying programme.

“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 other leakers,” Mr Obama said at the time, stressing that he was not pardoning Ms Manning but believed “justice has been served”.

In a statement last week, Ms Manning thanked that former President and said that letters of support from veterans and fellow transgender people inspired her “to work toward making life better for others.”

“For the first time, I can see a future for myself as Chelsea,” she said.

Ms Manning was imprisoned at the US Army's Fort Leavenworth base in Kansas. (EPA)

“I can imagine surviving and living as the person who I am and can finally be in the outside world. Freedom used to be something that I dreamed of but never allowed myself to fully imagine.”

Ms Manning’s representatives said she was subjected to violence in prison and argued the military mistreated her by requiring her to serve her sentence in an all-male prison, restricting her physical and mental health care and not allowing her to keep a “feminine” haircut.

“The conditions in my cell were far beyond what is normally associated with solitary confinement. I needed permission to do anything in my cell. I was not allowed to move around the cell to exercise. I was not allowed to sit down with my back against the wall,” said a testimony last year.

Amnesty International, which is among the groups campaigning for Ms Manning’s release, called for protections to be put in place to ensure other whistleblowers are “never again subjected to excessive and cruel treatment”.

Pointing out that her original sentence was longer than those handed down to military personnel convicted of murder, rape and war crimes, the group attacked “antiquated legislation” that denied the opportunity for a public interest defence.

“Chelsea’s treatment is especially galling given that nobody has been held accountable for the alleged crimes that she brought to light,” said Margaret Huang, executive director of Amnesty International USA.

“The US authorities’ vindictive treatment of Chelsea Manning after she exposed potential military wrongdoing is a sad reflection of the extremes those in power often go to in order to deter others from speaking out.”

The Army said she would remain on active duty in a special, unpaid status of “excess leave” that will legally entitle her to military medical care along with commissary privileges, while her court-martial conviction is under review.