A suicide bomber dressed in a military uniform set off a blast that killed more than 100 soldiers Monday, authorities said, in what appears to be the deadliest attack ever on troops in Yemen.
It left at least 101 dead and more than 220 injured, with some in critical condition, authorities said.
"The war on terror will continue until it is completely destroyed regardless of the sacrifices," President Abdrabuh Mansur Hadi said in a statement carried by state news agency Saba.
More than an hour after the attack, there were still bodies at the blood-spattered scene, and some ambulances responding to the blast took six or seven victims each, an official said.
"We heard a massive explosion. Minutes later, there were so many emergency vehicles, it seems as if hundreds were injured," said resident Ali al-Husseini, who was near the attack.
A Yemeni official in Washington said it was too early to know who was responsible but that suicide attacks are "the hallmark of al Qaeda."
The partially lawless Middle Eastern country has become a central battleground in the fight against al Qaeda, with the terror network's leader calling recently for an uprising against the new president.
The Yemeni branch of the group calls itself al Qaeda in the Arabian Peninsula.
Monday's blast targeted a military parade rehearsal in Sabeen Square in the capital Sanaa, said Mohammed Albasha, a spokesman the Yemeni Embassy in Washington.
The attack took place about 200 meters (218 yards) from the presidential palace. No one immediately claimed responsibility.
The country's defense minister, Mohammed Nasser Ahmed, and military chief of staff Ahmed al-Ashwal were in the area but far from the site of the attack itself, and were unharmed, officials said.
The president fired top security officials, including a nephew of the former president, after the attack.
Gen. Ammar Saleh was sacked as director of the National Security Bureau, said a Yemeni official who is not authorized to speak to the media. He is being replaced by Maj. Gen. Mohammed Jameh al-Khadar.
Saleh may keep a second and more important post as first deputy for national security.
The head of central security, Abdul Malik al-Tayyeb, was fired by presidential decree after the attack. He is being replaced by Fadhl al-Qosi.
The soldiers were preparing for Tuesday's National Day of Unification ceremonies when they were attacked.
The day celebrates the union of South Yemen and North Yemen on May 22, 1990, to form Yemen.
U.N. Secretary-General Ban Ki-moon condemned the attack and called for the perpetrators to be held accountable.
"The secretary-general calls on all in Yemen to reject the use of violence in all its forms and manifestations, and expects them (to) play a full and constructive role in implementing Yemen's political Transition Agreement," a statement from his office said.
Abdul Latif al-Zayani, secretary general of the Gulf Cooperation Council, called Hadi to express condolences, Saba reported.
"Al-Zayani stressed that the GCC States will spare no effort to back Yemen in order to achieve the desired stability and development," Saba said.
Monday's attack came a day after three American contractors working with Yemen's coast guard were wounded in a shooting in the port city of Hodeida, two local security officials said.
One person has been arrested in the attack, the sources said.
Last week, al Qaeda's leader called for the Yemeni people to rise up against the country's new president, portraying him as the stooge of the unpopular former president, Ali Abdullah Saleh, and the United States.
"So, Ali Abdallah Saleh is gone, and his successor Abed Rabbo Mansour Hadi has taken over," al Qaeda's chief commander Ayman al-Zawahiri said in a video posted on jihadist forums.
Saleh, who led Yemen for 30 years, relinquished power last year after an extended popular uprising in a transition agreement that was supported by the United States. Hadi was Saleh's vice president, and al Qaeda has exploited the connection to stir resentment against the new government.
Last year, Ansaar al-Sharia, an offshoot of al Qaeda, took over the majority of districts in the southern Abyan province, benefiting from the political turmoil in the country. Numerous military bases were evacuated, making it easier for the militant groups to grow in power and territory.
On Sunday, fierce clashes between government troops and al Qaeda fighters left 21 people dead, two local security officials said.
The officials said the violence erupted when hundreds of troops attempted to sweep through areas around the district of Jaar, the main stronghold for al Qaeda in Abyan province.
Al Qaeda fighters fought back, kicking off clashes that continued for nine hours, the officials said. Fourteen militants and seven troops were killed in the fighting, they said.
Government forces have been battling fighters loyal to the local branch of al Qaeda for more than a year, but not made lasting headway.
The United States has carried out dozens of drone strikes against militants in Yemen, including the radical American-born cleric Anwar al-Awlaki, who was killed in September.
U.S. officials said last month they had foiled a plot to bring down a U.S.-bound aircraft with a device that originated in Yemen.
The plot was brought to authorities' attention by a mole who infiltrated al Qaeda, a source in the region told CNN.
The mole works for Saudi intelligence, which has cooperated with the CIA for years, the source said.
Information from the mole also led to a drone strike this month that killed Fahd al Quso, 37, whom the U.S. considered a senior operative of al Qaeda in the Arabian Peninsula.