Most of the dead were reported to have been students
The Somali Islamist group al-Shabab has denied being responsible for a suicide attack in Mogadishu in which at least 22 people were killed.
Those who died, including three government ministers, have been buried amid tight security in the capital.
Al-Shabab and other Islamists control much of Mogadishu and the country. They had been accused of the bombing.
But a spokesman for the group said they believed the government had been responsible for the attack.
"We declare that al-Shabab did not mastermind that explosion," Sheikh Ali Mohamud Rage told reporters.
"We believe it is a plot by the government itself. It is not in the nature of al-Shabab to target innocent people."
The spokesman said some government officials had left the Shamo Hotel before the bomb went off, so it was "clear that they were behind the killing".
He said the militants had only heard of the attack through media reports and had "sent condolences to the relatives of the victims".
Presidential spokesman Hassan Haile had told the BBC on Thursday he believed the bomb was the work of al-Shabab.
The radical Islamist insurgent group, which wants to enforce a strict version of Islamic law in Somalia, is accused of having links to al-Qaeda.
It has previously carried out several suicide bombings on government targets and has immediately claimed responsibility.
No group has said it was behind Thursday's attack.
BBC East Africa correspondent Will Ross says it seems unlikely that different government factions would resort to bombing each other.
The fact that many other people, including medical students, were also killed may mean it is difficult for any group to own up to this attack because it would only lead to a loss of support, our correspondent says.
Thursday's explosion went off in a crowded meeting room at the hotel, where hundreds of people had gathered for a graduation ceremony of medical students.
Al-Shabab is accused by some of being a proxy for al-Qaeda in East Africa
Information Minister Dahir Mohamud Gelle said the male bomber had been dressed in women's clothing, "complete with a veil and a female's shoes".
Officials said Health Minister Qamar Aden Ali, Education Minister Ahmed Abdulahi Waayeel and Higher Education Minister Ibrahim Hassan Addow were all killed.
Sports Minister Saleban Olad Roble was critically wounded and remains in hospital.
At least three journalists were also among the dead but most of those killed were reported to have been students. More than 60 people were injured.
The BBC's Mohammed Olad Hassan, who was at the scene, said it had been a "shocking, terrible scene".
Somalia's President Sheikh Sharif Sheikh Ahmed, has described the attack as a "national disaster".
He described the victims as "dear citizens... unjustly assassinated while carrying out their duty to the nation".
The hotel is often used by the few foreigners - aid workers, journalists and diplomats - who still visit Mogadishu.
Somalia has had no effective government for almost 20 years.
The blast happened in one of the small parts of the city controlled by the weak UN-backed government, just 1km (0.62 miles) from the K4 junction, where the African Union peacekeeping force in Somalia, Amisom, has a base.
Amisom's acting head, Wafula Wamunyini, said the blast was "intended to intimidate and blackmail" government.
But in a statement, the AU said it would "not deter the resolve and determination of the African Union to support the people of Somalia in their quest for peace and reconciliation".
The students had been graduating from Benadir University, which was set up in 2002 to train doctors to replace those who had fled overseas or been killed in the civil war.