A suicide car bombing claimed by al Qaeda killed at least 26 people outside a presidential palace in southern Yemen on Saturday, hours after Abd-Rabbu Mansour Hadi was sworn in as president tasked with bringing stability to a chaotic nation.

The car was driven at the gates of a presidential palace in the port city of Mukalla, Yemen's fourth-largest city, far from the capital Sanaa where Hadi was sworn in. Dozens were injured, and the governor of Hadramout province, Khalid Saeed al-Dayni, said most of the dead were soldiers.

Al Qaeda claimed responsibility and said the attack had been carried out by a Yemeni jihadi.

The sound of the explosion was strong and was heard in many parts of the city, a resident of Mukalla said.

The strength of the explosion shattered glass windowpanes and doors in buildings near the explosion.

Sanaa, the scene of much fighting in recent months between factions of the army supporting protesters and units loyal to the former leader, was relatively quiet.

After taking the oath, Hadi had singled out al Qaeda, whose active Arabian Peninsula branch is based in Yemen, as a top priority for his new administration: Continuing the war against al Qaeda is a national and religious duty.

The former army general was the sole candidate to replace Ali Abdullah Saleh, who had led Yemen for three decades but was pushed out by months of street protests sparked by the Arab Spring, and supervise a transition to democracy.

While the street protests and bouts of bloody repression by security forces have subsided, Yemen remains in turmoil from mass poverty, unemployment and corruption, rebellions in the north and south, and the threat from al Qaeda.

Saudi Arabia and the United States long saw Saleh as the main bulwark against al Qaeda in Yemen, which sits on one of the world's main oil shipping routes, but threw their weight behind a power transfer deal as protests against him grew.

DRAWING A LINE

Hadi said in a speech that Yemen must draw a line under a year of protests and violence and turn its attention to economic problems and the job of returning those displaced by the crisis to their homes.

I stand here at a historic moment ... I look to the Yemeni people and give them thanks. The crisis reached every city and village and house, but Yemen will continue to go forward, Hadi said.

If we don't deal with challenges practically, then chaos will reign.

Jamal Benomar, U.N. envoy to Yemen, said: Yemenis want an end to the crisis, and to turn a new page. Now it's time to rebuild, for consensus and concord ... and to bring people into an inclusive political process.

The U.S. ambassador to Yemen, Gerald Feierstein, said: We are seeing the beginning of a process that I believe will deliver great results over the next two years.

Hadi now has the job of overseeing a two-year political transition that foresees parliamentary elections, a new constitution and a restructuring of the military, in which Saleh's son and nephew still hold power.

An inauguration ceremony is scheduled for Monday. Saleh, who returned to Yemen early on Saturday after seeking treatment in the United States for injuries suffered in an assassination attempt last year, is due to attend.

After the speech, protesters in the southern city of Aden clashed with security forces, killing one soldier, a local security official said. Two soldiers and two protesters were injured, medics added.

(Additional reporting by Nour Merza in Dubai; Writing by Reed Stevenson; Editing by Sophie Hares)