Al Shabaab rammed a suicide car bomb into the gates of Kenya Defence Force base in Somalia and fought their way inside early on Friday.
The Somali militant group and the country's army confirmed the attack saying fighting was still going on.
There were no immediate reports about casualties from the attack in Ceel Cado, in the south of the country, about 550 km west of Mogadishu, near the Kenyan border.
KDF spokesman David Obonyo was not immediately available for comment but a report indicates at least 50 Kenyan soldiers were killed.
Al Shabaab, a group aligned to al Qaeda, said the base had Kenyan soldiers serving as part of an African Union force battling them in Somalia, a country mired in conflict since civil war broke out in 1991.
"Our fighters went in and after heavy exchange of gunfire we took over the base," Sheikh Abdiasis Abu Musab, al Shabaab's military operations spokesman, told Reuters.
Musab added that AU soldiers fled from the base.
But a Somali military official said the fighting in the base continued. Residents said they could hear sporadic gunfire.
"A suicide car bomb exploded at the gate of the base and their fighters went in. There is heavy gunfire going on inside the base," Major Hussein Abdulle, a military officer stationed about 100 km from the Ceel Cado base, told Reuters.
Al Shabaab has in the past year staged multiple attacks against African Union bases in Somalia, part of a guerrilla-warfare strategy to drive out foreign troops and impose its harsh version of Islamic law across the Horn of African nation.