At least 26 people have been killed by a suicide car bomb in Yemen's southern Hadramawt province, officials say.
The bomb was detonated outside a presidential palace in the city of Mukalla - most of the dead were members of the elite Republican Guard.
The attack came hours after Yemen's new President Abdrabbuh Mansour Hadi took the oath of office.
He has replaced Ali Abdullah Saleh, who resigned after months of protest against his rule.
Mr Hadi was elected in a single-candidate poll on Tuesday, which was marred by violence in the south of the country. Nine people died in the clashes.
The election followed a deal brokered by Yemen's neighbours to end the crisis.
Mr Saleh, who has been in power for 33 years, will formally hand over power in a ceremony on Monday.
Witnesses said the vehicle was driven towards the palace and detonated at the entrance. Surviving soldiers then opened fire, said reports.
One unnamed military official told AFP news agency the vehicle had been a pick-up truck and that the attack "carries the fingerprints of al-Qaeda".
The militant network later said it was behind the attack, telling Reuters the bombing was "in retaliation for the Republican Guards' crimes".
Southern separatist militant groups are also active in the region.
The Republican Guards are the elite troops of the national army - they are under the command of Ali Abdullah Saleh's son, Ahmed, AFP said.
A short while earlier, Mr Hadi was sworn in in the capital Sanaa, 540km (330 miles) to the west.
In a speech broadcast live on television, he vowed to continue the fight against al-Qaeda, calling it a "national and religious duty".
"If we don't restore security, the only outcome will be chaos," he said.
Yemen has been plagued by rebellion, with a separatist movement in the south and a Shia insurrection in the far north, as well as growing influence of al-Qaeda.
There have been growing fears that extremists might try to take advantage of the crisis which led to Ali Abdullah Saleh's resignation.
Mr Hadi also promised to work to bring home the thousands of internal refugees created by fighting between government troops, southern separatists, mutinous military units, and other factions.
Mr Hadi, who is from the south, has previously called for dialogue with the separatists.