Dozens of inmates were injured in rioting in Jordan's largest prison on Tuesday, a day after three inmates were killed in another jail in violence prompted by attempts to segregate Al Qaeda militants from other prisoners.

Police spokesman Maj. Mohammed al-Khatib said some 400 prisoners were evacuated from their jail blocks after rioting erupted at 9:30 a.m. at the Swaqa Penitentiary, 62 miles south of the Jordanian capital.

The riots were led by dozens of prisoners convicted of murder and theft, he said. The rioters smashed windows and lamp posts and used them as tools to cut their faces and bodies, Al-Khatib said, adding that others set mattresses in their blocks ablaze.

At least 40 inmates suffered cuts or smoke inhalation, before firefighters put out the fires and the rioting ended five hours later.

Al-Khatib said the trouble in Swaqa, the largest of Jordan's 10 prisons, was in solidarity with riots at another Jordanian jail, the Muwaqqar Penitentiary, where three inmates were killed in rioting involving scores of prisoners who were objecting to separating Al Qaeda-linked militants from other convicts.

Police said the three died of smoke inhalation after they also set fire to mattresses in the three-hour-long rioting at Muwaqqar.

Police said Muwaqqar rioting began when wardens tried to move some non-militant inmates to other sections of the desert prison, or to other detention facilities in line with a police regulation introduced last week.

The decision calls for separating convicts from detainees who are still on trial. It also divides inmates according to age, physical build, conviction and sentence length.

A recent study released by the Jordan-based National Center for Human Rights has warned that authorities must pay more attention to the "appalling" conditions in Jordanian prisons, such as overcrowded cells and lack of recreation facilities.