A German court has sentenced a Moroccan man to seven years in prison for belonging to a terrorist organization. But, the court cleared Mounir el-Motassadeq of involvement in the September 11, 2001, terrorist attacks against the United States.

The 31-year-old Motassadeq, a resident of Hamburg, and self-confessed friend of three of the September 11 suicide hijackers, has always denied knowing anything about the plot to attack U.S. targets.

Still, he was convicted in 2003, and sentenced to 15 years in prison for being an accessory to murder in relation to the attacks on New York and Washington, as well as belonging to a terrorist group.

Those convictions were thrown out a year later by the German supreme court, which said the U.S. government had withheld information relative to Motassadeq's defense.

The year-long retrail, which ended on Friday, hinged to a large extent on evidence from suspected al-Qaida detainees in the United States, whose testimony Washington did not allow at the first trial. U.S. officials did not let the court question the prisoners, citing security reasons, but released summaries of information they had given under interrogation.

Judge Ernst-Rainer Schudt, who presided over the retrial in Hamburg, criticized the failure of the United States to give his court access to the al-Qaida prisoners, saying the summaries of their interrogations did not provide sufficient proof of Motassadeq's participation in the September 11 plot.

But the court spokeswoman, Sabine Westphalen, said that the Moroccan student was found guilty on another charge.

"The defendant has been sentenced to seven years imprisonment for membership of a terrorist organization," said Sabine Westphalen.

Motassadeq admitted attending an al-Qaida training camp in Afghanistan, and acknowledged that he had carried out financial transactions for the three suicide pilots, whom he had known in Hamburg, while they were at flight school in the United States.

And even though the Moroccan was found not guilty of being part of the September 11 plot, Andreas Schulz, the German lawyer for relatives of the September 11 victims, expressed satisfaction at Friday's verdict.

"This is very satisfactory for the families of September 11, and we are quite confident that this verdict will stay final," said Andreas Schulz.

But another legal battle lies ahead. Motassadeq's lawyer, Ladislav Anisic, says he will appeal the sentence. He says that, even if the appeal fails, he does not expect his client to serve more than a year in prison before being expelled from Germany because of time Motassadeq has already spent in jail.