Forensic policemen inspect site of suicide bomb attack at parade square in Yemeni capital of Sana'a Reuters

At least 22 people have been killed in a suicide bombing at the police academy in the Yemeni capital of Sana'a.

Most of the dead were cadets who were about to leave the academy at the end of classes.

"The suicide bomber blew himself up at the police academy in Sana'a and killed at least 22 people and wounded dozens," an official told AFP.

The attack bears the hallmark of al-Qaida which has pledged to retaliate against a US-led offensive on their strongholds throughout the country.

Dozens more were wounded in the explosion at the academy, doctors told Reuters.

In May a man in army uniform blew himself up in Sana'a during a rehearsal for a military parade, killing 96 people.

It was the deadliest attack in the city since President Abd-Rabbu Mansour Hadi took power in February. It coincided with a US-backed Yemeni army offensive against al-Qaida militants in the south.

Hadi pledged to keep fighting al-Qaida "until we have eradicated their presence in every village".

The terrorist group managed to kill the chief of Yemen's southern military region in a suicide attack in Aden at the end of June.

"One of our jihadists succeeded in assassinating Major General Salim Ali Qoton who had led a month-long offensive against our families and strongholds in Abyan," an al-Qaida spokesman said.

"We were forced to flee our cities. We have not lost the war or [been] defeated. Our war against crusaders will continue till we take full revenge."

The attack came as al-Qaida left its last bastion in Yemen's provinces. Qoton led the offensive that forced the militant group to pull out from Azzan in Shabwa province, the last town in Yemen where the terrorists had complete control.

Nearly 600 people have died in the campaign, the majority of them al-Qaeda, according to AFP.