SANAA, Yemen (AP) — A Yemeni court has sentenced 11 alleged al-Qaida militants to up to 10 years in prison for forming armed gangs to destabilize the country and planning attacks on foreign embassies as well as army and security forces.

Ahmed al-Hababi, one of the defendants, threatened to kill the judge, shouting in the courtroom, "we will teach you a lesson and we will drag you on the ground." Two others raised al-Qaida's flag inside the defendants' cage in the court in Sanaa. Still others shouted "God is great" in Arabic.

Also on Tuesday, a court in Aden began trying nine Yemenis — one in absentia — who were arrested in January in the country's territorial waters trying to smuggle Iranian-made weapons on a ship. The trial was adjourned until April 30.