A Syrian man released from the prison at Guantanamo Bay last year sued the U.S. military Wednesday, saying that he was the victim of a "Kafkaesque nightmare" in which he was tortured by al-Qaeda after being accused of being U.S. spy, liberated, then tortured again by the Americans, who held him for seven more years by mistake.

Abdul Rahim Abdul Razak al-Janko, 32, who has been resettled outside the United States, filed suit Wednesday in U.S. District Court in Washington, the same court that ordered his release in June 2009.

At the time, U.S. District Judge Richard J. Leon concluded that the U.S. government's case for holding Janko "defies common sense." Janko was tortured by al-Qaeda and imprisoned by the Taliban under medieval conditions for 18 months on suspicion of being a spy for the United States or Israel. Leon found no evidence that the Syrian remained loyal to either group.

Janko "is the victim of a decade-long Kafkaesque nightmare from which he is just awakening," the suit says. "Whether a country provides redress for the people it has wronged in violation of international and U.S. law is a true test of the character of a nation."

Janko, who formerly used the names al Ginco and Rassak, says that he was urinated on by his American captors, slapped, threatened with loss of fingernails and exposed to sleep deprivation, extreme cold and stress positions. A 40-page lawsuit also says that U.S. authorities broke his knee, used police dogs against him and caused kidney damage by failing to treat him for kidney stones.

Twenty-six current and former top U.S. military officials are named in the suit, which seeks damages and alleges violations of Janko's rights under the Constitution, the Geneva Conventions and a U.S. law that allows non-Americans to sue for violations of the law of nations.

In his earlier decision, Leon had said the U.S. government mistook Janko as a suicide bomber based on a videotape captured at an al-Qaeda safehouse. In fact, the recording was a propaganda video showing a Janko making a false confession after he had been subjected to electric shocks and near-drowning by al-Qaeda.

Spokesmen for the Justice Department did not respond to requests for comment late Wednesday on the case, which had not been entered into the court's electronic database.