Kenya will not be "cowed by cowards", the President has said in his condolence message to the families of soldiers killed in an attack in Somalia on Friday.
President Uhuru Kenyatta lauded the soldiers' swift efforts to prevent more deaths in the attack at the El Adde African Union base.
He said the attack on Kenyan soldiers will not bring to an end the mission for peace and stability in Somalia.
"I take this opportunity to express mine and the country's deepest sympathy to the families and loved ones of the fallen. I stand with you," he said in a statement.
"Our country stands with you. We deeply appreciate the sacrifices made by your loved ones in defence of our democracy, our peace and our security."
Amani leader Musalia Mudavadi also sent a condolence message sayign the attack showed how serious the threat of terrorism is.
"It can fatal for us to relapse into a false sense of security. Kenyans must remain extremely vigilant against the evil of terrorism," he said in a staement.
Al Shabaab fighters attacked a remote Somali army base and entered a nearby town close to the border with Kenya, saying they had killed dozens of soldiers who are part of the African Union Mission in Somalia.
Somali and Kenyan military officials said the fighters had seized the Somali army base near the town of Ceel Cadde, about 550 km (340 miles) west of Mogadishu in a region near Kenya's border.
The group, which is aligned with al Qaeda, said it took over the base after a suicide bomber rammed its gates, and also controlled the town, capturing nearly 30 trucks and armoured vehicles.
The group's military operations spokesman, Sheikh Abdiasis Abu Musab, told Reuters it had killed more than 60 Kenyan soldiers serving with Amisom, while others escaped.
Al Shabaab has often inflated casualty figures in the past, while the Somali government and other official estimates have often played down the numbers.
A spokesman for the Kenya Defence Forces (KDF) said al Shabaab fighters overran the Somali army base and Amisom had counter-attacked.
"The number of casualties on both sides is unknown," Colonel David Obonyo, KDF spokesman, said in a statement.
A senior Somali military official confirmed the militants had taken over the base.
"Amisom has gone out of the town and base for strategic reasons," Colonel Farah Surow, who is based about 100 km (60 miles) from the Ceel Cadde base, told Reuters.
A spokesman for the peacekeeping force said the battle for the base was still under way.
An Amisom spokesman said the al Shabaab toll was exaggerated but did not give a figure. There was no independent figure.
"The fighting is ongoing," Amisom spokesman Paul Njuguna said.
A shopkeeper in the Ceel Cadde town said soldiers from Amisom appeared to have left the town and fighters were now on the streets.
"We see al Shabaab in every corner of town," shopkeeper Abdullahi Iidle told Reuters. "Some residents have fled."
Al Shabaab has been driven out of major strongholds in Somalia by an offensive by Amisom and the Somali army that was launched last year. But the fighters still control some parts of the countryside and often launch guerrilla-style assaults and bomb attacks.
African Union troops, now numbering about 22,000 from several African nations, have spent nearly a decade battling al Shabaab insurgents in Somalia, a country mired in conflict since civil war broke out in 1991.
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 Africa nation.