* Attack bears hallmarks of Islamist al Shabaab
* Gunfire still heard more than 30 minutes after attack
* No immediate word on casualties (Adds details of ongoing shooting, context)
By Abdi Sheikh
MOGADISHU, June 19 (Reuters) - A suicide bomber and several gunmen attacked a United Nations compound in the Somali capital Mogadishu on Wednesday, police and witnesses said, in a strike that bore the hallmarks of al Qaeda-linked militants.
The bomber set off his explosives outside the gate of the United Nations Development Programme (UNDP) base before attackers ran inside and opened fire on security guards, a senior police official told Reuters.
Gunfire could still be heard more than 30 minutes after the initial explosion. It was not immediately clear whether any U.N. officials were caught up in the gun battle or whether anyone was killed or wounded.
U.N. agencies have only recently started building up their offices and international staff inside Somalia after a period of relative improvements in security.
African Union forces and government troops drove Islamist al Shabaab rebels out of the coastal capital almost two years ago, but the militants have kept up guerrilla-style attacks from rural bases. (Reporting by Abdi Sheikh; Writing by Richard Lough; Editing by Andrew Heavens)