Yemen has taken control over hundreds of al-Qaeda inmates who tried to escape after they staged a mutiny in Sanaa prison, an official said.

The mutiny broke out on Tuesday afternoon when "almost 300 al-Qaeda prisoners, armed with knives and iron bars, attacked prison guards, injuring some of them," the official said on Wednesday, adding that an interrogation officer was among those wounded.

The prisoners, who smashed the doors of their cells and broke down the prison's first security barrier, seized weapons and took some guards hostage.

Using the weapons, they clashed with guards manning the second security barrier, who returned fire and managed to "foil the group's attempt to flee," the official said.

A number of inmates were wounded, but none were killed, several sources said.

The prisoners released their hostages early on Wednesday after mediation, but held onto their weapons, the official said, adding that police were still trying to control the situation in the prison.

Nasser al-Wuhayshi, chief of al-Qaeda in the Arabian Peninsula (AQAP) - seen by the United States as the network's deadliest franchise - vowed in August to release imprisoned members of his network.

Wuhayshi himself escaped from the same Sanaa prison with 22 other members of AQAP in February 2006 and was named as the group's leader a year later.

The AQAP detainees escaped through a 44-metre tunnel between their cell and a nearby mosque they dug with tools.

AQAP has taken advantage of the weakening of the central government in Sanaa since a popular uprising that toppled President Ali Abdullah Saleh in 2011.

Source: AFP