Al-Shabaab said there had been both Kenyan and American casualties (File)

Jihadists from Somalia's Al-Shabaab group on Sunday attacked a military base used by US and Kenyan forces in Kenya's coastal Lamu region, a government official said.

"There was an attack but they have been repulsed," Lamu Commissioner Irungu Macharia told AFP.

He said the attack took place before dawn at the base known as Camp Simba, and that "a security operation is ongoing", without saying if there had been casualties.

"We are not sure if there are still remnants within," he said.

Al-Shabaab claimed responsibility for the attack in a statement, saying they had "successfully stormed the heavily fortified military base and have now taken effective control of part of the base."

The group said there had been both Kenyan and American casualties, however this could not be immediately verified.

Al-Shabaab said the attack was part of its "Al-Quds (Jerusalem) shall never be Judaized" campaign -- a term it first used during an attack on the upscale Dusit hotel complex in Nairobi in January last year that left 21 people dead.

The Somali jihadists have staged several large-scale attacks inside Kenya, in retaliation for Nairobi sending troops into Somalia in 2011 to fight the group, as well as to target foreign interests.

Despite years of costly efforts to fight Al-Shabaab, the group on December 28 managed to detonate a vehicle packed with explosives in Mogadishu, killing 81 people.

The spate of attacks highlight the group's resilience and capacity to inflict mass casualties at home and in the region, despite losing control of major urban areas in Somalia.