SANAA, Yemen – A Yemeni soldier detonated a bomb hidden in his military uniform during a rehearsal for a military parade, killing 96 fellow soldiers and wounding at least 200 on Monday in one of the deadliest attacks in the capital in years.

Al-Qaida’s branch in Yemen claimed responsibility, saying in an emailed statement that the suicide attack was intended to avenge a U.S.-backed offensive against al-Qaida in a swath of southern Yemen seized by the militant movement last year.

The bombing left a scene of carnage, with scores of bleeding soldiers lying on the ground as ambulances rushed to the scene.

“This is a real massacre,” said Ahmed Sobhi, one of the soldiers. “This is unbelievable. I am still shaking. The place turned into hell. I thought this only happens in movies.”

Al-Qaida said the bomber was targeting Yemen’s defense minister, Maj. Gen. Mohammed Nasser Ahmed, who had arrived at the heavily secured city square to greet the assembled troops just minutes before the blast ripped through the area. He was unhurt.

Khaled Ali, another soldier, said the explosion was followed by heavy gunfire.

“In the mayhem, we were all running in all directions. I saw the guards of the minister surrounding him and forming a human cordon. They were firing in the air,” he said.

The bombing comes as Yemeni President Abed Rabbo Mansour Hadi has been pressing ahead on two difficult fronts — battling al-Qaida in the south and purging loyalists of ousted leader Ali Abdullah Saleh from military and security top posts.

Saleh stepped down in February as part of a U.S.-backed, power-transfer deal brokered by Gulf Arab countries aimed at ending political unrest in the country after a yearlong uprising. The deal gave Saleh immunity from prosecution in return for relinquishing his power.

Saleh originally appointed Ahmed to lead the defense ministry but recently has pressed from behind the scenes for his dismissal because Ahmed has been cooperating with Hadi.

Military officials said the bomber belonged to the Central Security, a paramilitary force commanded by Saleh’s nephew Yahia Saleh. He detonated his explosives in the midst of the Central Security unit as it received orders to pass in front of the parade view stand where both the defense minister and the military chief of staff were sitting.