(CNN) -- Longtime Guantanamo Bay, Cuba, detainee Mohammed Jawad has been returned to his native Afghanistan, the Justice Department announced Monday.
The announcement came a little over three weeks after a federal judge ruled the U.S. government was illegally holding Jawad.
Jawad's transfer was completed "under appropriate security measures" in accordance with an arrangement between the U.S. and Afghan governments, the Justice Department indicated.
U.S. officials "will continue to consult with the Afghan government regarding Jawad," the department said in a news release.
Jawad had been held in captivity at the prison on the U.S. Navy base at Guantanamo Bay since 2002, when he was captured by Afghan forces and detained for allegedly throwing a hand grenade at a U.S. military jeep in Kabul. Two U.S. servicemen and their Afghan translator were injured.
Jawad's lawyers said that although their client is clearly an adult today, he may have been as young as 14 years old when he was arrested. The U.S. government had claimed he was probably 17 years old. No birth records are believed to exist.
Last year a judge threw out statements by Jawad, who -- after first denying that he threw the grenade at the military jeep -- confessed to Afghan authorities when they threatened to kill him.
"We are so pleased that this nightmare of abuse and injustice has finally come to an end," said Jonathan Hafetz, an American Civil Liberties Union attorney who worked for Jawad's release.
"While Mr. Jawad can never get back the nearly seven years he was illegally detained and tortured, now he can finally return home to his family, friends and country, and begin to build a normal life."