Al-Shabab militants have overrun an African Union military base outside the southern Somali town of el-Ade.
The Islamist group says it has taken “complete control” of the AU camp and killed more than 60 Kenyan soldiers.
Residents told the BBC that al-Shabab had raised its flag at a camp for Kenyan troops and said insurgents had paraded bodies through the town.
But Kenya’s army spokesman said it was a nearby Somali base that was stormed and Kenyan troops counter-attacked.
The number of casualties on both sides was not known, Kenyan military spokesman Col David Obonyo said in a statement.
He told the BBC that reports of high Kenyan casualties were “normal propaganda from al-Shabab”.
Kenya contributes more than 4,000 troops to the 22,000-strong AU force that is in Somalia helping the UN-backed government battle al-Shabab, which is part of al-Qaeda.
An el-Ade resident told the BBC by phone that he had heard a loud explosion at about 05:30 local time (02:30 GMT), followed by heavy gunfire.
“We then saw an al-Shabab fighter in the town. We also saw Kenyan soldiers who were fleeing from the camp.
“At the moment the camp is in the hands of al-Shabab. We can see military cars burning and dead soldiers all over the place. There are no civilian casualties but most people have fled the town.”
Analysis: Tomi Oladipo, BBC Monitoring Africa security correspondent
Al-Shabab is keen to stress – both to the foreign forces in Somalia and would-be defectors within its ranks enamoured by so-called Islamic State – that it is a force to be reckoned with.
It is true that the group exaggerates the scale of its attacks but whether or not the death toll from el-Ade attack is as high as claimed, the African Union mission (Amisom) will have to recognise it still has a long way to go to gain full control of the country.
It says a lot for the insurgents to be daring enough to strike at the heart of an African Union base and engage troops in hours of combat.
They have done this before – in two major attacks targeting the Somali military last year, dozens of Burundian troops and Ugandans soldiers were killed.
Despite these setbacks, Amisom has achieved a lot recently by managing to push al-Shabab out of many parts of southern Somalia.
An al-Shabab official told the BBC that its fighters had attacked the base after morning prayers, starting with a car bomb before storming the facility.
“We took control of the base after one hour of fierce fighting,” he said.
“We counted 63 Kenyan bodies inside the base. The other Kenyan troops have run away into the bush and we are hunting them down.”
He said the militants were confiscating 28 of 31 military vehicles inside the camp and all arms and ammunition.
The two military bases – one for Somali troops and the other for AU soldiers – neighbour each other on the outskirts of el-Ade, which is in Gedo region, about 380km (240 miles) west of Mogadishu.
Al-Shabab was ousted from the capital, Mogadishu, in August 2011, but still has a presence in large areas of southern Somalia and often stages attacks across the country.