(CNN) -- A male suicide bomber dressed in women's clothing killed three members of Somalia's U.N.-backed interim government and 16 others Thursday when he detonated at a medical school graduation ceremony in Mogadishu, government officials and witnesses said.
The Transitional Federal Government said Education Minister Abdullahi Wayel, Health Minister Qamar Aden and Higher Education Minister Ibrahim Hassan Adow were among the dead after the bomber attacked Banadir University's medical school commencement. The African Union, which leads a peacekeeping mission in Somalia, put the death toll at 19.
The victims also included nine students and two doctors, according to a professor at Banadir University, while journalists said two of their colleagues died in the blast. In addition, Sports Minister Suleman Olad Roble was hospitalized in critical condition, his relatives told local media.
Somali President Sheikh Sharif Sheikh Ahmed blamed the Islamist rebel group Al-Shabaab for the attack and displayed what he said was the body of the bomber for reporters, a local journalist who attended the news conference told CNN.
The body the president displayed had a beard. The president also showed the remains of the suicide belt and shreds of a hijab -- a garment worn by some Muslim women to reflect modesty -- at the news conference, according to the journalist, whom CNN is not naming for security reasons.
At the United Nations, the Security Council condemned the bombing as an act of terrorism against "people dedicated to building a peaceful, stable and prosperous future for the people of Somalia." It urged a "thorough investigation" and expressed hope that those responsible would "be brought swiftly to justice."
"The Security Council expresses its deepest sympathies and condolences to the families of those killed and to those injured in the attack, as well as to the Transitional Federal Government and the people of Somalia," the council's current president, Burkina Faso's U.N. Ambassador Michel Kafando, said Thursday.
Video of the graduation ceremony showed Dr. Osman Dufle, the country's former health minister, speaking as the camera begins to shake -- apparently from the explosion. Afterward, Dufle told journalists that he saw a person dressed in black moving through the audience just before the blast, according to the Radio Mogadishu journalist.
Al-Shabaab is made up of former allies of Ahmed, once a leader of the Islamist movement that briefly held power in Mogadishu in 2006. Adow, a Somali-American, served as the foreign secretary of the Islamic Courts Union when it held Mogadishu.
But while Ahmed and other former members of the ICU accepted a U.N.-brokered peace agreement with the government they once fought, Al-Shabaab -- which the United States says has links to al Qaeda -- has rejected the peace agreement and has waged a bloody campaign against the transitional government.
The African Union's peacekeeping mission AMISOM condemned Thursday's attack. It vowed to "spare no efforts to ensure that the perpetrators of this act and such heinous crimes against humanity being carried out in Somalia" will be brought to justice.
The journalists killed were Mohamed Amiin Abdullah of Shabelle Media Network and freelance cameraman Hassan Ahmed Hagi, who worked closely with the network.
CNN regularly works with Shabelle Media.
The African Union condemned the attack, saying it would "spare no efforts to ensure that perpetrators of this act and such heinous crimes against humanity being carried out in Somalia" will be brought to justice.
The National Union of Somali Journalists also condemned the attack and said it brought the number of journalists killed in the country this year to eight.
CNN's Ben Brumfield and journalist Mohamed Amiin Adow contributed to this report.