The death toll from an attack late on Thursday by Islamic militants on a seaside restaurant in the Somali capital Mogadishu has risen to 10, police said.

The casualties comprised six civilians, two members of the security forces and two of the attackers, Ali Abdullahi, a police officer, said on Friday.

"Nine people including two Al-Shabaab gunmen were killed in the attack" on Thursday, Mogadishu city spokesman Abdifatah Halane said.

Al-Qaeda linked Al Shabaab jihadists attacked the Banadir Beach Restaurant close to the city's Lido Beach, setting off a car bomb before exchanging fire with security forces.

Source: b'Attack outside beach-front restaurant Beach View Cafe on Lido beach in January 2016 |Source: Reuters\xc2\xa0'

The restaurant is popular with young people and government officials. Around 20 people managed to escape from the restaurant during the gunfight.

By Friday morning officials said the attackers had been killed.

All the "attackers have been gunned down and the restaurant is now under the full command of the Somali government soldiers," regional police commander Colonel Abshir Bishaar told the Somali National News Agency.

Source: b'Attack outside beach-front restaurant Beach View Cafe on Lido beach in January, 2016 |Source: Reuters\xc2\xa0'

"The terrorist attack killed nine persons, five of them were civilians, two security forces and the other two were the militants who carried out the attack," Bishaar said, adding that two other civilians were injured.

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, Al Shabaab gunmen detonated a bomb before bursting into the Lido Sea Food Restaurant and spraying gunfire at terrified customers, killing 20 people.

Source: b'A ttack outside beach-front restaurant Beach View Cafe on Lido beach in January 2016 |Source: Reuters\xc2\xa0'

The group is expected to try and violently disrupt elections due to be held in September and October.

Despite abandoning the capital five years ago Al Shabaab still launches regular attacks against government, military, civilian and foreign targets.

The jihadists have also staged repeated attacks in neighbouring Kenya and a recent security analysis warned the group was expanding its horizons with cells active in Djibouti, Ethiopia, Kenya, Tanzania and Uganda as well as Somalia.

(Feature image source: Reuters)

(With inputs from  AFP & Reuters)