Mounir El Motassadeq, 30, had been serving a maximum 15-year prison term in Hamburg since a court in the city convicted him in February 2003 of giving logistical help to the Hamburg al Qaeda cell that included three of the Sept. 11 pilots.
He was ordered freed on condition that he stay in Hamburg and not be issued a new passport, said Sabine Westphalen, spokeswoman for the Hamburg state court. He was released later in the day.
El Motassadeq smiled broadly as he left the prison where he had been held since November 2001. He walked past waiting reporters without saying a word and was whisked by friends and his lawyer into a car, which took off for an unknown location.
In their decision, the judges also said they viewed suspicions against el Motassadeq as less serious than before.
While the original arrest warrant cited "urgent suspicion" that he was guilty of more than 3,000 counts of accessory to murder, that has been downgraded to "adequate suspicion," Westphalen said. He also faces unchanged charges of membership in a terrorist organization, she said.
El Motassadeq was found guilty of the combined charges in his first trial. An appeals court has ordered a retrial starting June 16, saying he was denied a fair trial because the U.S. government refused access to a key witness in its custody.
Prosecutors allege el Motassadeq helped cell members conceal their involvement in the plot to attack the United States while they lived and studied in Hamburg.
El Motassadeq acknowledged during his trial that he trained at an al Qaeda camp in Afghanistan and was friends with the three Hamburg-based suicide hijackers — Mohammed Atta, Marwan al-Shehhi and Ziad Jarrah — but he denied any knowledge of the Sept. 11 plot.
The federal appeals that court threw out his conviction last month cited the absence of testimony by Ramzi Binalshibh. The Yemeni, captured in Pakistan on the anniversary of the Sept. 11 attacks, is believed to have been the Hamburg cell's main contact with Osama bin Laden's al Qaeda network.
Binalshibh might be able to testify that El Motassadeq knew nothing of the plot, the Moroccan's lawyers say.
The ruling mirrored the U.S. trial of Zacarias Moussaoui, in which federal prosecutors have been sanctioned by a judge for failing to allow the defendant — accused of a role in the Sept. 11 plot — to interview al Qaeda suspects in American custody.
New evidence that could help el Motassadeq at his retrial emerged at a Hamburg court hearing Friday where lawyers sought his release.
The court was presented with an intercepted 2003 telephone call in which suspected cell member Said Bahaji told his wife that he and others close to the hijackers knew nothing of the planned attacks.
Also presented was a 2002 letter from Bahaji to his mother in which he wrote "Mounir didn't know anything," the attorney said.
German authorities say Bahaji, a suspected cell logistician, left Germany shortly before the Sept. 11 attacks and remains on the run.
El Motassadeq lived with his wife and two children in an apartment near Hamburg's Technical University, where he studied before his November 2001 arrest.
His attorney said he is expected to resume living with his family at a different location that he would not disclose.
The absence of testimony from Binalshibh also helped bring about the acquittal of el Motassadeq's friend and fellow Moroccan Abdelghani Mzoudi on the same charges in February.
Mzoudi's case turned in his favor when the Hamburg court heard a statement from an unidentified source that only Binalshibh and the suicide hijackers knew of the Sept. 11 plot — which could also exonerate el Motassadeq. The court said it believed the source was Binalshibh himself.