A German court has convicted three Middle Eastern men of aiding al-Qaida in Germany and sentenced them to prison.

The court in Duesseldorf Wednesday gave the three men - Ibrahaim Mohamed Khalil, Yasser Abu Shaweesh, and Ismail Abu Shaweesh - prison terms ranging from three-and-a-half to seven years.

Prosecutors say one of the men, Khalil, had trained with al-Qaida in Afghanistan, and had contact with the terrorist group's top leaders, including Osama bin Laden.

One of the men is thought to be Syrian. The other two are brothers, and are said to be Palestinians.

Prosecutors say the men were planning to carry out a suicide attack. They were also convicted of fraud for taking out a number of life insurance policies in a scheme to raise money, presumably for al-Qaida.

Some information for this report was provided by AP and Reuters.