(Adds details, background)
By Feisal Omar and Abdi Sheikh
MOGADISHU, May 24 (Reuters) - A car bomb at parliament in the Somali capital killed at least four people on Saturday, police and Reuters witnesses said. Al Qaeda-linked al Shabaab militants claimed responsbility for the blasts.
Gunfire was heard after the blasts inside the parliament compound, a Reuters witness said. He saw four bodies at the site.
"Two explosions went off inside the Somali parliament house compound," police officer Major Nur Ali told Reuters. Some members of parliament were inside the building at the time, one lawmaker said. Gunfire was also heard from a mosque opposite.
Police confirmed at least four people had been killed.
Mogadishu has been hit by a series of suicide bomb attacks claimed by al Shabaab militants, who were pushed out of the capital about two years ago and have waged a sustained guerrilla campaign since then.
A lawmaker said some of his colleagues were in the compound.
"I am now in the town but I know some of my colleagues are having talks inside the house," the lawmaker, who asked not to be identified, told Reuters. (Additional reporting by Abdirahman Hussein; Writing by George Obulutsa; Editing by Robin Pomeroy)