A general view shows smoke billowing from shipping containers near the Adan Abdulle International Airport international in Mogadishu, Somalia March 23, 2022.
A general view shows smoke billowing from shipping containers near the Adan Abdulle International Airport international in Mogadishu, Somalia March 23, 2022. Reuters / FEISAL OMAR

At least five people, including two of the attackers, were killed during a raid by armed militants on Wednesday on an army base near the Somali capital's international airport, a diplomatic memo said.

Earlier, state TV had said security forces were dealing with a "terrorist incident" at the gates to the camp. A witness said gunmen had forced their way in and started shooting.

State radio reported later that the two attackers had been stopped at the base gates.

"Security Forces have shot dead two armed terrorists who attempted to force their way into the army base near #Mogadishu's Adan Abdulle International Airport on Wednesday and police will give details shortly," state TV said.

An internal diplomatic security memo seen by Reuters said two security guards, thought to be Kenyan nationals, and a Somali policeman were also killed in the incident, while four others were wounded.

Al Qaeda-linked al Shabaab said it was behind the attack, and had fired mortars into the camp, where African Union (AMISOM) peacekeeping troops, United Nations and other international organisations are based.

Abdiasis Abu Musab, an al Shabaab spokesman, said the group's fighters had gained entry to the base and inflicted casualties, but he did not provide any evidence.

Videos and photos shared on social media showed black smoke billowing from an area near the airport runway.

Mahad Hirsi, a witness at the compound, told Reuters he saw the attackers force their way through the gate and start shooting, and that "a number of injured AMISOM soldiers (were) lying on the ground".

Spokespeople for AMISOM and the United Nations' Somalia office did not immediately respond to Reuters' calls and messages requesting comment.

A travel agent said flight traffic had been halted due to the gunfire near the airport.

Al Shabaab aims to topple Somalia's central government and impose its own severe interpretation of Islamic law.

Separately, a young female lawmaker was killed by a suicide bomber on Wednesday in the city of Beledweyne, around 300 km (186 miles) north of Mogadishu, witnesses and relatives said.

Amina Mohamed, a vocal critic of the government known for her fiery speeches, was killed as she approached a building housing Hirshabele state leaders.

"I heard huge blast, I went to the scene which is just at the entrance of the state house," Adan Farah, a local elder, told Reuters by telephone. "May God rest her soul."