(Updates with death toll, al Shabaab's claim of responsibility)
MOGADISHU, July 31 (Reuters) - Attackers set off two car bombs outside a police base in Somalia's capital before gunmen stormed inside on Sunday, leaving at least seven people dead, police said.
Islamist group al Shabaab claimed responsibility for the assault on the headquarters of Somalia's Criminal Investigation Department (CID) in Mogadishu, saying fighting was ongoing.
It was the second major operation in the city this week by the Islamist militants who have kept up their guerilla war on the Western-backed government in the face of U.S. drone strikes and African peacekeeping forces.
Heavy gunfire rang out inside for about half an hour after the first blast, said witnesses.
The bodies of four civilians lay in the street near the compound which was partially destroyed. A kiosk near the wall caught fire.
"We have confirmed seven dead including civilians and two militants," Ali Mohamed, a police officer, told Reuters.
Al Shabaab's military operations spokesman, Abdiasis Abu Musab, said one of its suicide bombers had started Sunday's attack by ramming a car bomb into the building's gate.
In al Shabaab's first attack this week, 13 people were killed when two car bombs went off at the gate of the African Union's main peacekeeper's base on Tuesday.
Security analysts had warned that the group could step up its attacks, taking advantage of the distraction caused by campaigning for a presidential election due in August.
Al Shabaab, seeking to impose its harsh form of Islam on the Horn of Africa nation, has also launched attacks in Kenya and Uganda, which have contributed troops to the African Union peacekeeping force. (Reporting by Abdi Sheikh and Feisal Omar; Writing by Duncan Miriri; Editing by Andrew Heavens)
© Thomson Reuters 2016 All rights reserved