A Pentagon spokesman said Mehdi-Muhammed Ghezali had been released to Sweden's government and was no longer at Guantanamo.
Swedish officials confirmed Ghezali's release, and said he was being flown back to the Scandinavian country by a special flight on Thursday.
Foreign Minister Laila Freivalds said in Stockholm that Ghezali was not expected to be charged by police for any crime, but could not say if he would be monitored by security police once he arrived.
"That is up to the security police," she said. "I take it for granted that he's free, and I have received no indication that any government department will do anything to try to arrest him."
Ghezali, born in Sweden to a Finnish mother and Algerian father, was reportedly part of a group of 156 suspected al-Qaida fighters arrested in 2001 by Pakistani authorities while fleeing the Tora Bora mountains into Pakistan.
His father, Mehdi Ghezali, has staged a series of on-again, off-again hunger strikes to draw attention to his son's plight in Guantanamo.
On Thursday, he expressed shock about his son's release, saying: "I will believe it when I see him here."
"I will buy him a football. He likes to play football"
father of freed Swede
"I will surprise him when he comes home. I will buy him a football. He likes to play football."
Sweden had repeatedly called on the United States to either charge Ghezali or release him from the US naval base at the eastern tip of Cuba. Swedish Prime Minister Goeran Persson raised the issued during an April meeting with US President George Bush in Washington.
Among those held are seven French detainees and four Britons, whose governments have been pressing for their release. Several European detainees, including five Britons and a Dane, have been let go and several French inmates are expected to be sent home soon.
According to the Pentagon, Ghezali is the 135th Guantanamo Bay prisoner released from the base, while 594 men remain detained.