* Two bombs at parliament compound, gunfire ongoing
* Islamist militant group al Shabaab claims responsibility
* Prime Minister calls attack "despicable" (Adds details, prime minister, diplomat quote, colour)
By Feisal Omar and Abdi Sheikh
MOGADISHU, May 24 (Reuters) - Al Shabaab stormed Somalia's parliament on Saturday, killing at least four people in a bomb and gun assault that the United Nations called "an attack against the people".
The attack - by the group that killed 67 people at a Kenyan shopping mall last year - started with a car bomb at a gate to the heavily fortified parliament compound, followed by a suicide bombing and then a gun battle which continued for hours.
A police officer confirmed four of his colleagues were killed and local media said the total death might number dozens.
Reuters witnesses saw four bodies at the scene and saw a soldier fall from a rooftop after being shot. Reuters television pictures showed a large pool of blood near blast site, and a man with his shirt drenched in blood running away from the scene.
Hours after the initial explosion, gunfire and smaller blasts could still be heard around the parliament.
"We are behind the suicide bombing, explosions and the fighting inside the so-called Somali parliament house, and still heavy fighting is going on inside," said al Shabaab spokesman Sheikh Abdiasis Abu Musab.
The attack on parliament, a building about 300 metres (yards) from the president's palace that is guarded by African Union peacekeepers and Somali forces, showed that the al Qaeda-linked group remains capable of hitting the centre of Mogadishu despite being pushed out of the capital two years ago.
"The terrorists have once again shown that they are against all Somalis, by killing our innocent brothers and sisters. These cowardly, despicable actions are not a demonstration of the true Islamic faith," said Prime Minister Abdiweli Sheikh Ahmed.
Nicholas Kay, Special Representative of the U.N. Secretary-General for Somalia, said: "The Federal Parliament represents the people of Somalia and their hopes and aspirations for a peaceful and stable future. Today's attack is an attack against the people of Somalia for which there can be no justification."
Somalia's government is struggling to impose any sense of order, more than two decades after the fall of dictator Mohamed Siad Barre tipped the country into chaos.
In February at least 11 people were killed when al Shabaab attacked the presidential compound. In April they killed two lawmakers.
A Western diplomat who has worked with regional intelligence agencies said the attack would add to pressure on President Hassan Sheikh Mohamud from about 100 parliamentarians who last month called for him to be impeached over worsening security.
"The federal government is exercising no control," the diplomat said. "Those ... in parliament will start asking questions: what is this guy achieving?"
The diplomat said the attack also showed that a surge by the African Union peacekeeping troops had not weakened al Shabaab's capacity to wage asymmetric warfare in the capital, where coordination between Somali and foreign intelligence agencies is poor.
"Because intelligence is fragmented, al Shabaab is slipping through the net," said the diplomat. "They are becoming more dangerous."
(Additional reporting by Abdirahman Hussein in Mogadishu, Drazen Jorgic in Nairobi; Writing by George Obulutsa; Editing by Robin Pomeroy)
Our Standards: The Thomson Reuters Trust Principles.