Two explosions have killed at least 11 people near the parliament in Baidoa, the seat of Somalia's largely powerless puppet interim government.
One of the blasts on Monday afternoon happened outside a hall where Abdullahi Yusuf Ahmed, the president, had given a speech 10 minutes earlier, a local journalist said.
Many politicians were still in the building where they had been discussing a new parliament designed to shore up the government which has been challenged by the rise of the Islamic courts.
"Five people were killed from the presidential convoy and three wounded," Ismail Hurre, the foreign minister, said.
Six attackers were killed and two captured in a gunbattle with Yusuf's bodyguards after the explosion, he added.
The puppet president's brother was among the dead, the associated Press news agency reported quoting government officials.
Witnesses said that many people had been injured in the blasts.
Hurre told Reuters news agency: "A car exploded when the puppet president's convoy was passing on the way to his residence. He is fine."
"This was an attack aimed at assassinating the president to destabilise the government," he added.
The explosions from suspected car bombs sent huge balls of flame into the sky and destroyed eight cars, including three that were in the president's convoy, witnesses said.
The Supreme Council of Somalia, that has gained control of Mogadishu, the capital, and much of the south of the country in recent months, denied carrying out the attack.
"We are very sorry for the incident that took place in Baidoa," said Abdurahim Ali Muddey, a spokesman for the group.
"Those who carried out this attack are the enemies of Somalia, they wanted to undermine our ability to resolve differences by ourselves," he added.
Earlier, speaking to Aljazeera from Mogadishu, Sheikh Sharif Sheikh Ahmad, chief of the Islamic Courts Executive Council in Somalia, said, "We reject any form of violence as we look forward to achieving peace".
"It seems that there were many conspiracies plotted against this country (Somalia)", he said.
He urged all officials to be on alert to confront such plots and bear their responsibilities.
"I accuse foreign countries particularly Ethiopia of planning for such an act as it seeks to get its troops into Soamlia and to justify its position before the UN", he told Aljazeera.
He criticized the Somali foreign and interior ministers for the "unaccountable statements " they made about the incident.
Agencies