At least four Emirati soldiers and a Bahraini officer were killed in a Somalia attack claimed by the al-Shabab terrorist group.
The military personnel were training the Somali national army, the United Arab Emirates' Defense ministry said Saturday.
The soldiers were "exposed to a terrorist act" while "performing their work duties in training and qualifying the Somali Armed Forces," the ministry said in a statement on social media platform X.
Two others were wounded in the incident, the ministry said, without giving further details.
The UAE "continues to coordinate and cooperate with the Somali government in investigating the sinful terrorist act," the statement added.
A Somali military source told Agence France-Presse (AFP) that the gunman was a member of the Somali army who opened fire inside a training camp in the capital Mogadishu, killing and injuring an unknown number of people including soldiers from the UAE.
"The shooting was carried out by a member of the army who stayed in the camp. He was killed in the shooting," said a senior Somali army official who spoke on condition of anonymity to discuss sensitive security matters.
The attack was claimed by al-Shabab, a terrorist group aligned with al-Qaida that has waged a violent insurgency against Somalia's central government and its foreign backers for over 15 years.
President Hassan Sheikh Mohamud sent his condolences "to the government and the people of the United Arab Emirates over the death of the military officers in Mogadishu who came to assist in rebuilding the Somali army."
"We condemn in our strongest terms this heinous act in which these officers were killed. I have instructed an urgent investigation on the matter," he said in a post on X.
The United Arab Emirates and Somalia signed a military and security cooperation agreement in January 2023.