A Brit is believed to be among the four victims of Islamist militants who stormed an upmarket hotel in the Somali capital of Mogadishu on Sunday.

Mohamed Sayid Hassan Elmi, from Birmingham, has been named locally as the British man killed when al-Shabaab militants opened fire at guests of the Villa Rose Hotel.

He had been in the politically unstable East African nation - where these types of attacks are common - for less than two weeks before the siege, according to reports.

Friends back home in Birmingham described him as "a good person and a good friend" and one of the leaders of the city's Somali community.

The gunmen stormed the hotel yesterday, but gunfire and explosions continue to ring out today as security forces try to drive them out in a brutal siege.

The Villa Rose Hotel is situated within walking distance of Mogadishu's presidential palace and is popular with senior government officials.

Its website says it's frequented by "the business traveller, International organisations working in Somalia and international diplomats".

Villa Rose Hotel in Mogadishu, where a British man was among four killed in a terror attack (
Image:
Villa Rose Hotel)

National Security Agency official Mohamed Dahir said that government forces had pushed the militants back and had them surrounded in one of the hotel's rooms.

"So far we have confirmed the death of four people," he said.

Other hostages have already been rescued from the venue, he said, adding the "situation" will soon "return to normal".

Among the injured were government officials, he said.

The extremist group al-Shabab has claimed responsibility for the attack.

Al-Shabab said in a broadcast on its own radio frequency Sunday that said its fighters attacked the hotel Villa Rose, which has a restaurant popular with government and security officials.

Scores of people were rescued from the hotel and security forces have launched an operation to remove the assailants, police spokesman Sadik Dodishe told state media.

A number of hostages have already been rescued from the besieged building (not pictured) (
Image:
AFP via Getty Images)

Abdi Hassan, a government worker who lives near the hotel, told the Associated Press that he believes several government officials were inside the hotel when the attack started. Some were seen jumping the perimeter wall to safety while others were rescued, he said.

The hotel isn't far from the presidential palace in central Mogadishu, where a blast was heard, followed by gunfire.

Such militant attacks are common in Mogadishu and other parts of the Horn of Africa nation.

The latest attack comes amid a new, high-profile offensive by the Somali government against al-Shabab, which still controls large parts of central and southern Somalia.

Al-Shabaab militant attacks are common in Mogadishu and other parts of East Africa (
Image:
Farah Abdi Warsameh/AP/REX/Shutterstock)

Extremist fighters loyal to the group have responded by killing prominent clan leaders in an apparent effort to dissuade support for the government offensive, and attacks on public places frequented by government officials and others persist.

Hotels and restaurants are frequently targeted, as are military bases for government troops and foreign peacekeepers.

Last month at least 120 people were killed in two car bombings at a busy junction in Mogadishu. Al-Shabab, which doesn't usually claim responsibility when its assaults result in a high civilian death toll, carried out that attack, the deadliest since a similar attack at the same spot killed more than 500 five years ago.

Al-Shabab opposes Somalia's federal government, which is backed by African Union peacekeepers, and seeks to take power and enforce a strict version of Sharia law.

The United States has described al-Shabab as one of al-Qaida's deadliest organizations and targeted it with scores of airstrikes in recent years. Hundreds of U.S. military personnel have returned to the country after former president Donald Trump withdrew them.