At least two security personnel were on Tuesday killed and three injured after their lorry drove over an Improvised Explosive Device in Baure area, Lamu county.
The bomb is believed to have been planted by al Shabaab militants operating in Boni Forest.
Public Affairs officer Col Zipporah Kioko said the casualties were taken to the Defence Forces Memorial Hospital in Nairobi.
She said forces have been deployed and are in hot pursuit of the militants.
The incident comes ahead of planned opening of the Lamu port on Thursday by President Uhuru Kenyatta.
Police said operations have been enhanced ahead of the event.
The troops were on a morning patrol party when they came into contact with a terrorist RC-IED.
“Army lost troops in the incident while a dozen others were injured. A major operation is ongoing in the area,” said a senior officer aware of the developments.
Lamu County Commissioner Irungu Macharia said response teams were on the ground.
The incident happened at about 9am on Tuesday within Boni Forest.
The area is near the Kenya-Somalia border which has been under attack by terrorists in the past months.
Boni Forest is an operation zone as the national government has since 2015 conducted a multi-agency security exercise dubbed Linda Boni, which is aimed at chasing out al Shabaab militants hiding there.
In April, two people were killed when a lorry they were traveling in ran over a similar IED.
The two were part of a team constructing the border wall that is aimed at stopping the militants from crossing into and out of Kenya.