NAIROBI, June 19 (Reuters) - The Somali Islamist militant group al Shabaab said on Wednesday its fighters were behind an attack on a United Nations compound in Mogadishu and said a battle between their gunmen and security forces continued more than an hour after an initial blast.

"Mujahideen units from the Martyrdom Brigade have stormed the UNDP compound near the airport in Mogadishu," the group said on its official Twitter feed @HSMPRESS1. A U.N. spokesman in Mogadishu said the attackers had entered the compound.