NAIROBI, Kenya — When the United States tried to capture a powerful militant in Somalia last weekend, it did not go after the leader of the Shabab extremist group, but a Kenyan national whose ties were as much in his native country as in the Horn of Africa.

Outside of Somalia itself, Kenya sends more fighters to the Shabab than does any other country, analysts say. Young Kenyan men have ridden buses to the border in large numbers for years, local Muslim leaders say, drawn by payments of up to $1,000 to cross into Somalia and fight for the group.

But ever since the Kenyan military stormed into southern Somalia two years ago, many Kenyan fighters have been coming back home, local leaders and experts say, creating a larger, increasingly sophisticated network of trained jihadists in a country where people from around the globe gather in crowded, lightly protected public places.

“The growing number of militants in Kenya,” said J. Peter Pham, director of the Africa Center at the Atlantic Council in Washington, “is a serious concern — or ought to be — for both U.S. policy makers and their Kenyan counterparts.”