EU Training Mission Somalia confirmed the convoy had been "hit by an explosion" (File)

The Al-Shabaab terrorist group claimed responsibility for an attack on a US base in Somalia on Monday, as the European Union confirmed a separate strike against a convoy of Italian advisers.

The terrorist hit the US base at Baledogle, about 110 kilometres northwest of the capital Mogadishu, with explosives before gunmen opened fire on the compound.

In a statement, Al-Shabaab said: "In the early hours of Monday morning, an elite unit of soldiers... launched a daring raid on the US military base" in Baledogle.

"After breaching the perimetres of the heavily fortified base, the Mujahideen (holy fighters) stormed the military complex, engaging the crusaders in an intense firefight."

There were no reports yet of any casualties.

Baledogle is a major launching site for US drone operations against Al-Shabaab, an Al-Qaeda-linked group which controls large parts of Somalia, and the Islamic State in Somalia outfit.

"Two heavy explosions occurred, the first one bigger than the other. There was also a heavy exchange of gunfire after the blasts but we don't know about the details," Mohamed Adan, a Somali elder close to the scene of the attack, told AFP by phone.

Car bomb hits convoy

In a separate incident on Monday, a security official said EU advisers training the Somali National Army were also attacked by a car bomb in Mogadishu.

"There was a car bomb targeting the EU military advisors along the industrial road. A vehicle loaded with explosives was rammed into one of the convoy vehicles," said Omar Abikar, a Somali security officer.

A statement from the EU Training Mission in Somalia confirmed the convoy had been "hit by an explosion" while returning from the army headquarters.

"No EUTM-S soldiers were injured in the explosion. Two vehicles sustained damage," read the statement.

The mission offers military advice and provides training to Somalia's army, currently still propped up by some 20,000 African peacekeepers as the country recovers from decades of civil war and an Islamist insurgency.

Italy's defense ministry said in a statement that two armoured vehicles in an Italian convoy "were involved in an explosion when returning from a training exercise with Somali security forces".

"For the instant there have been no consequences for Italian soldiers".

SITE Intelligence, which monitors jihadist activities worldwide, said Al-Shabaab had claimed responsibility for both attacks.

The US Africa Command, AFRICOM, said in a brief statement emailed to AFP that it was "monitoring the situation. We are working to confirm details on the incident and will have more information as soon as we can confirm facts on the ground."

Baledogle is a Soviet-built base which, despite secrecy surrounding US operations in Somalia, has emerged as one of the bases from where they carry out their strikes.

US strikes in Somalia surged in April 2017, after President Donald Trump declared the south of the country an "area of active hostilities". The rate of airstrikes rose sharply in 2019.

In an April statement AFRICOM said it had killed over 800 people in a total of 110 airstrikes in Somalia since April 2017.

Monday's attacks are the latest in a long line of bombing and assaults claimed by Al-Shabaab.

The jihadists were driven out of Mogadishu by government forces backed by 20,000 African Union peacekeepers in 2011. But they still carry out attacks including suicide bombings against government and international targets.