Dusk falls over the thatched roofs and white walls of Lamu's ancient stone town. The lilting muezzin calls float out over the calm waters of the channel as the crooked alleys fill with Muslim faithful hurrying to evening prayers.
The idyllic scene has put the archipelago of Lamu on the itineraries of both well-heeled tourists and adventurous backpackers. X-Files star Gillian Anderson was married here last year, and Sex and the City's Kim Cattrall is a regular, drawn like many by the islands' relaxed "no news, no shoes" reputation.
It is a strange place to find the US military on active duty. The soldiers on patrol here are part of the 1,500-strong Horn of Africa Combined Joint Task Force stationed in a former French Foreign Legion base in the tiny Red Sea state of Djibouti.
The primary reason for the military manpower and its associated hardware lies just up the coast: the lawless, failed state of Somalia, long seen as a hotbed of Islamic fundamentalism.
"We find the terrorist networks here using the fact that there is a lot of ungoverned space in the Horn of Africa," said Maj Gen Samuel Helland, a former commander of the Djibouti task force.
"It's very easy for a terrorist organization to establish a presence. It's very easy for them to train, equip, organize, and use the facilities that are present to gain a foothold."
The border with Somalia is barely 70 miles north of Lamu, explaining why US officials were keen to accept Kenya's invitation to bolster their sea and land defenses against any southern spread of radical Islam.
American troops regularly support the Kenyan Navy as they search boats for drugs, equipment, or illegal agents trying to slip into Kenya.
They have on occasion marched in full combat gear through Lamu's narrow lanes in a show of force, especially during a tense period when investigators linked the area to a series of terror attacks in Kenya and Tanzania.
Fazul Abdullah Mohammed, the chief suspect in the 2002 suicide bombing of an Israeli-owned hotel in Mombasa and in a failed missile attack on an Israeli holiday jet, lived on one of the remote islands of the archipelago.
Suspects in the 1998 truck-bomb attacks on the US embassies in Nairobi and Dar es Salaam which together killed 224 people, were later found to have links to the area.
While Lamu is overwhelmingly Islamic, a tolerant and moderate version of the religion is preached here and Muslim leaders prickle at suggestions their congregations might harbor or breed terrorists.
"No one here will go and tie themselves with detonating things in the name of our religion, certain that they are going to die," says Imam Hussei Saud Elmaany, 72-year-old chairman of Lamu's Council of Elders.
"It is not our way, it is not the way of peace which comes to us from Allah, and we in Lamu have always welcomed outsiders, whoever they are, and we continue to do so."
There is, however, a new edge to the atmosphere in town, where more and more women now wear full hijab and owners of the few bars in town selling alcohol are vilified by other Muslims.
Zainab Yakub, manager of a hotel on Lamu's seafront, says she is aware of a dangerous undercurrent in the town.
"There are a lot of jobless youths who have no opportunities. It is an easy place to find people who are vulnerable to outside forces, who can be turned around very easily," she said.
That's where a small contingent of the US Army's 412th Civil Affairs Battalion steps in.
The four-man team is helping facilitate a public-works campaign designed to ease hardships in poor communities, win loyalties, and cut off Islamic fanaticism before it can take root.
In and around Lamu, there are signs of progress. There are newly painted schools, well stocked clinics and deep wells pumping fresh water to parched villages.
"When we first came here, there was some skepticism because we were seen as military even though we never wear uniforms," said Sgt. Nicholas Keane, a gruff medic from North Dakota attached to the team operating in Lamu.
"But we have gone in and done our assessments, helped them with what they need, and they are saying, 'Hey, these guys aren't so bad after all.' "