At least 70 people have been killed by a huge suicide blast near a government compound in the Somali capital, Mogadishu, say officials.
Eyewitnesses said a truck carrying explosives was driven into a gate near a government ministry and detonated.
A spokesman for the Islamist militant group al-Shabab told the BBC it had carried out the attack.
It is the largest attack since al-Shabab withdrew its forces from Mogadishu in August.
Rescue workers said more than 50 people had been injured in the blast. Many of the victims were soldiers and students who had been waiting at the education ministry.
The UN-backed transitional government condemned the attack and said no senior government officials were hurt in the blast. Government members were meeting in the building near the blast site at the time.
"The attack shows that the danger from terrorists is not yet over and that there are obviously still people who want to derail the advances that the Somali people have made towards peace," it said in a statement.
The government statement set the number of dead at 15, but it was not clear whether this was only an initial count.
'Walls fell apart'
The blast struck outside a compound housing government buildings in Kilometre Four (K4) - a crossroads in central Mogadishu.
Police officer Ali Hussein told the Associated Press news agency that the vehicle had exploded after pulling up at a checkpoint on the way into the official compound.
Somalia's Planning Minister Abdullahi Godah Barreh told the BBC's Focus on Africa programme he was in his office when the blast hit.
"All of a sudden a huge, huge sound and all the furniture and all the windows and all the walls started falling apart," he said.
The vehicle carrying the explosives was big, he said, about an eight- or 10-tonne truck.
"The building that has been destroyed houses eight ministries, and you can imagine how crowded it would have been."
He said the area was protected, "but unfortunately, it was not good enough".
"Almost half of the cabinet sit in that building. So you can understand it was a good target for them - the terrorists."
BBC Somali's Mohammed Dhore in Mogadishu said vehicles were on fire, bodies lying in the street and shocked soldiers were randomly firing into the air in the aftermath.
Our correspondent said it was the worst incident he had ever come across.
One aid worker said the force of the blast had thrown body parts hundreds of metres away.
Among those killed were soldiers guarding the offices and students who had been queuing for exam results at the education ministry, hoping to gain a scholarship to study in Turkey.
Ali Abdullahi, a nurse at Medina hospital in the city, said victims were being brought in with horrific wounds, including burns and lost limbs. Some had been blinded, he said.
"It is the most awful tragedy I have ever seen," he told AP.
"Dozens are being brought here minute-by-minute. Most of the wounded people are unconscious and others have their faces blackened by smoke and heat."
Somalia has been without an effective central government since 1991 - the weak transitional government and Islamist militias are competing for control of the country.
Al-Shabab, which has links to al-Qaeda, controls large swathes of south and central Somalia.
It retreated from Mogadishu two months ago following an offensive by African Union troops,, but analysts had predicted that without a front line, the organisation was likely to begin carrying out more bombings, including suicide attacks.
Last week, al-Shabab tried but failed to seize two towns from pro-government forces near Somalia's border with Kenya.
Somalia's political instability has been compounded in the past year by the worst drought in six decades, which has forced tens of thousands of people to flee to Mogadishu in search of food.
The UN has declared a famine in six regions of Somalia.
The BBC's East Africa correspondent, Will Ross, said the latest attack will not only worry the government, but also the aid agencies, who have been taking great risks to get food to the drought victims.