Armed group al-Shabab has claimed responsibility for the deadly twin blasts that ripped through a busy car park in the Somali capital, Mogadishu.

At least 18 people were killed in the Somali capital on Saturday when the two explosions occurred near a popular restaurant, police said.

"Successful operations carried out in Mogadishu's Hamarweyne district," the group said on its Somali-language Twitter feed.

The al-Qaeda-linked group claimed to have killed "key officials", but witnesses said the casualties they had seen looked like ordinary civilians.

Nearby buildings were destroyed, the witness said, and passers-by came running over to help the victims.

Police and witnesses said the source of the first blast was a car laden with explosives that was parked by a restaurant close to the National Theatre.

"There were two heavy explosions at a parking lot near the National Theatre," police officer Mohamed Adan told the AFP news agency.

The second blast, which followed minutes later, was a "suicide bomber who blew himself up in the crowd of civilians who rushed to the scene of the first blast," Ahmed Weli Said, a Somali government security official, said.

UN condemns

The attacks drew condemnation from the UN and the Somali president.

"I am appalled by this act of savagery and condemn it in the strongest terms. I offer my sincere condolences to the families and friends of those killed and wish a speedy recovery to the injured," said the UN secretary-general's special envoy to Somalia, Nicholas Kay.

"The terrorist elements used to claim they target Somali government (officials) but such an attack is proof they have no sympathy for anyone, they kill innocent civilians at restaurants," Somali President Hassan Sheikh Mohamud told a press conference.

The National Theatre re-opened in 2012 after two decades.

Just weeks after it re-opened, al-Qaeda-linked al-Shabab fighters struck, with a suicide bomber blowing herself up and killing two of the country's senior sporting officials who were attending an event there.

"They attack the restaurants because they hate to see people peacefully spending time together,'' said Mohamed Abdi, an Interior Ministry employee, who spoke as he stood near the dead body of an old man.

"They are committed to obliterating any sign of peace. Because of such attacks, it's very hard for the government to restore security in the near future.''

African Union forces pushed al-Shabab out of Mogadishu in August 2011, but the group continues to carry out suicide attacks in the capital. 

Their most brazen recent attack was a suicide commando assault on a fortified UN compound in the centre of Mogadishu in June that killed 11.

Source: Al Jazeera and agencies