MOGADISHU, Somalia -- An Islamic extremist suicide bomber disguised as a police officer killed at least 17 and injured 20 at a police academy in Somalia's capital on Thursday, police said.

Col. Mohamud Aden said that 20 other officers were wounded by the blast, some of them seriously.

The bomber, with explosives strapped around his waist and torso, infiltrated Gen. Kahiye Police Academy and targeted officers gathering for special morning exercises, Capt. Mohamed Hussein said. The officers were rehearsing for Somalia's Police Day celebrations scheduled for Dec. 20, Hussein said.

Get Breaking News Delivered to Your Inbox

The Somalia-based al-Shabab extremist group quickly claimed responsibility for the attack. Al-Shabab's reach is vast and it is one of the most organized and dangerous of Africa's militant groups, reports CBS News correspondent Debora Patta.

Al-Shabab, affiliated with al Qaeda, no longer controls the crumbling city of Mogadishu, but has still been able to wreak havoc with its relentless bombing campaign. Their weapon of choice has been the vehicle bomb, like the one used with devastating effect on October 14, killing over 500 people in the capital.

Only a few terror attacks since 9/11 have killed more people.

The bomber who attacked the police academy on Thursday walked into the building undetected and joined a long line of officers in a rehearsal parade before he detonated the explosives under his sportswear, Capt. Hussein said.

"He detonated his bomb vest having realized that his presence had drawn suspicion among officers in the queue," he said.

Police officer Farah Omar who was at the scene at the time of the blast said the bomber targeted a spot where dozens of soldiers had gathered.

"He wanted to inflict a maximum damage," said Omar.

Al-Shabab has become the deadliest Islamic extremist group in Africa and is increasingly targeted by the U.S. military after the Trump administration early this year approved expanded airstrikes and other efforts against the fighters.

The U.S. has carried out at least 32 drone strikes this year against al-Shabab and a small but growing number of fighters linked to the Islamic State group, many of them defectors from al-Shabab.

A drone strike earlier this week against an al-Shabab vehicle carrying explosives prevented an "imminent threat to the people of Mogadishu," the U.S. Africa Command said.