Somali soldiers sit on a pickup truck near the wreckage of a car bomb that was detonated at the main gate of the presidential palace in Mogadishu, Somalia, Wednesday, July, 9, 2014. Somali troops retook the presidential palace in the capital of Mogadishu after militants forced their way in and exchanged heavy gunfire with troops and guards Tuesday, the latest attack underscoring the threat posed by Islamic extremist group al-Shabab in east Africa. (AP Photo/Farah Abdi Warsameh)

Officials said Somalia's internationally-backed President Hassan Sheikh Mohamud and Prime Minister Abdiweli Sheikh Ahmed were not inside the complex at the time and were "both safe". Security sources said they were with guards from the African Union's 22,000-strong AMISOM force. (AFP)