Khalil Senosi, Associated Press
Bodies of Kenyan soldiers are transported by ambulances as they arrive at Wilson airport, Nairobi Kenya, Friday Jan 27, 2017. A spokesman for extremist group al-Shabab says its fighters have killed at least 51 Kenyan soldiers in an attack on an army base in Kulbiyow, a town in Lower Jubba region.

MOGADISHU, Somalia — A spokesman for extremist group al-Shabab said Friday its fighters killed at least 51 Kenyan soldiers in an attack on a military base in Somalia. But Kenya denied it, saying "scores" of the extremist fighters were killed instead when its soldiers repelled the assault.

Al-Shabab spokesman Sheikh Abdiaziz Abu-Musab said the extremists seized military vehicles during the early morning attack in Kulbiyow town in Lower Jubba region.

But Kenyan military spokesman P.M. Njuguna said in a statement that the "rumors" being spread by al-Shabab were false. Kenyan soldiers with the African Union peacekeeping mission in Somalia "fiercely engaged" the al-Shabab fighters who tried to penetrate the base with an explosives-laden vehicle, Njuguna said.

A Somali military officer, Col. Ahmed Ali, said al-Shabab's massive suicide car bomb allowed dozens of extremists with machine guns to overrun the Kenyan camp, torching tents and arms depots.

Ali disputed al-Shabab's claim of killing at least 51 soldiers, saying the Kenyans fought back before retreating to a nearby area. He declined to give further details.

Al-Qaida's East African affiliate is fighting to impose a strict version of Islam in this Horn of Africa nation. It has lashed out with deadly attacks against countries like neighboring Kenya that contribute to the African Union mission.

Thousands of the AU troops are in Somalia to bolster the country's weak government, while al-Shabab continues to launch deadly guerrilla attacks like this week's assault on a hotel in the capital, Mogadishu, that killed at least 26.

Somalia's security forces are supposed to be taking on more responsibility as the AU force prepares to withdraw by the end of 2020. But concerns remain high about the country's security, and the ongoing al-Shabab attacks in the capital and elsewhere have contributed to several delays in Somalia's upcoming presidential elections, a key step in the country's recovery.

The vote once set for last year is now expected to be held Feb. 8 as the impoverished country tries to recover from decades of chaos that began in 1991, when warlords overthrew a longtime dictator.