It was not immediately clear if there were any casualties. The al-Qaeda-linked Shabaab group claimed responsibility for the attack through the website of their Andalus radio station. The Banadir Beach Restaurant near Lido beach is a popular eatery frequented by young people and Somali officials.
As in other recent Shabaab attacks, the violence began with the militants setting off a nearby car bomb before storming the building and engaging in a gunfight with security forces. From their position inside the restaurant, the attackers also lobbed several grenades at the security services who cordoned off the area, the correspondent said.
Somali authorities said the car bomb had failed to fully detonate and they escorted local reporters to a nearby hospital where they presented a wounded man, with his head bandaged, as the bomber. The Somali national news agency Sonna said some 20 people had been able to escape from the restaurant during the gunfight with the help of security forces.
It was unclear however how many, if any, customers and staff members remained trapped inside as the siege stretched into the night. The Shabaab group is fighting to overthrow the internationally-backed government in the capital Mogadishu.
It was forced out of the capital by African Union soldiers five years ago but continues to launch regular attacks including in recent months on restaurants, hotels and military bases. It is the second time this year the group has attacked the Lido beach area and its many eateries, including upmarket establishments popular with business people and diaspora Somalis who have returned home to the city.
In late January, Shabaab gunmen detonated a bomb before bursting into the Lido Sea Food Restaurant and spraying gunfire at terrified customers, killing some 20 people. The group is expected to try and violently disrupt elections due to be held in September and October.