Some of the Security operations around Boni Forest areas in Lamu County. (Photo: File)

A contingent of security personnel was deployed to the expansive Boni Forest to hunt Al-Shabaab terrorists who had killed three police officers and burned down Pandaguo police post in Lamu on Wednesday.

Villagers said there were explosions Wednesday morning as the security teams continued to pursue the gang of 150 that had raided the place and stole guns and medicine.

But questions were raised on the role of the locals in the raid after it emerged the raiders had prayed in a local mosque before they staged the attack.

They went to the mosque at about 5 am for the morning prayers.

It was then that they marched to the local police post and dispensary and looted guns and medicines respectively before setting them ablaze.

The attackers also commandeered a police vehicle and burnt a nearby communication mast before escaping.

Top security commanders from Nairobi were expected in the area to assure the locals of their security ahead of the election.

But other officers accused locals of colluding with the terrorists to attack them.

"How comes those who went with them to the mosque never bothered to alert us? They must have done so intentionally," said a senior officer in the area who argued it was unbelievable 150 people would pray there undetected.

Three police officers were killed and one seriously wounded. Fourteen others survived the attack, said police spokesman George Kinoti.

Kinoti said unknown number of terrorists were killed following hours of counter-attacks launched by reinforcement teams.

The attackers used RPGs (rocket-propelled grenades) and other small arms in the attack in which several tents were destroyed.

Witnesses said a number of villagers had escaped from their homes with a number of schools closing as the security agents engaged in gun battles with the militants.

The area is among that had received a facelift by the Government under Operation Linda Boni as part of efforts to ensure locals receive services.

Security agents including those from Kenya Defence Forces responded to the scene pushing them into the nearby Boni Forest in a shootout.

Their ground response was however slowed down by fears of mines that the terrorists could have planted on the roads leading to their escape routes.

Military choppers were deployed there to assist in locating the militants.

The area has been new wave of attacks in the area in the past months claiming more than ten lives.

On June 27, four pupils and four policemen were killed in an IED attack launched by the militants in Kiunga on a police vehicle.

The lorry was carrying 19 Administration Police officers and 15 civilians most of whom were children who had hiked a lift from Mararani to Kiunga when the incident happened.

Security agents were two weeks ago warned of Al-Shabaab attacks within Kiunga area, Milihoi, after roughly 100 of them were spotted by locals.