Al-Shabab terrorists attacked an African Union (AU) military base where Ugandan troops are stationed in Somalia on Friday, triggering clashes.
It was not immediately known if there were any casualties in the attack, which was claimed by the al-Qaida-linked terrorist group.
A car laden with explosives was driven into the base in Bulo Marer, 120 kilometers (75 miles) southwest of the capital Mogadishu, leading to a gunfight, local residents and a Somali military commander told Agence France-Presse (AFP).
Pro-government forces backed by the AU force known as ATMIS launched an offensive last August against al-Shabab, which has been waging an insurgency in the fragile Horn of Africa nation for more than 15 years.
ATMIS said the Bulo Marer camp came under attack at 5 a.m. (2 a.m. GMT) by al-Shabab militants "using Vehicle Borne Improvised Explosive Devices (VBIEDs) and suicide bombers."
"Reinforcements from ATMIS' Aviation Unit and allies managed to destroy weapons in possession of the withdrawing al-Shabab militants," it said in a statement.
The attack targeted Ugandan soldiers stationed in Somalia as part of ATMIS, Uganda Peoples' Defense Forces spokesperson Felix Kulayigye said in a statement, adding that the military was "cross-checking" details.
The 20,000-strong ATMIS force has a more offensive remit than its predecessor known as AMISOM.
The force is drawn from Uganda, Burundi, Djibouti, Ethiopia and Kenya, with troops deployed in southern and central Somalia.
Its goal is to hand over security responsibilities to Somalia's army and police by 2024.
Al-Shabab claimed via its communication channels that it had overrun the base and that it had inflicted a large number of casualties.
But Somali military commander Mohamed Yerow Hassan said the attackers had been repelled and the "situation is back to normal now."
"The terrorists were forced to retreat and flee," Hassan told AFP by telephone.
Al-Shabab is known to exaggerate claims of battlefield gains in propaganda, while the governments of nations contributing troops to the AU force rarely confirm casualties.
Attacks on army bases in isolated parts of Somalia are difficult to independently verify.
ATMIS said that "everything is being done to bring the situation under control."
Last year, Somalia's President Hassan Sheikh Mohamud launched an "all-out war" on the militants, rallying Somalis to help flush out members of the extremist group he described as "bedbugs."
In recent months, the army and militias known as "macawisley" have retaken swathes of territory in the center of the troubled country in an operation backed by ATMIS and U.S. airstrikes.
The U.S. Africa Command on Monday said it had carried out a strike the weekend before in Jilib in Somalia's south, and that initial assessments indicated no civilians were harmed.
Despite the gains by the pro-government forces, the militants have continued to strike with lethal force against civilian and military targets.
In the deadliest al-Shabab attack since the offensive was launched, 121 people were killed in October in two car bomb blasts at the education ministry in Mogadishu.
In a report to the U.N. Security Council in February, U.N. chief Antonio Guterres said that 2022 was the deadliest year for civilians in Somalia since 2017, largely as a result of al-Shabab attacks.