WASHINGTON — Armed with rifles and explosives, about a dozen Shabab fighters destroyed an American surveillance plane as it was taking off and ignited an hourslong gunfight earlier this month on a sprawling military base in Kenya that houses United States troops. By the time the Shabab were done, portions of the airfield were burning and three Americans were dead.

Surprised by the attack, American commandos took around an hour to respond. Many of the local Kenyan forces, assigned to defend the base, hid in the grass while other American troops and support staff were corralled into tents, with little protection, to wait out the battle. It would require hours to evacuate one of the wounded to a military hospital in Djibouti, roughly 1,500 miles away.

The brazen assault at Manda Bay, a sleepy seaside base near the Somali border, on Jan. 5, was largely overshadowed by the crisis with Iran after the killing of that country’s most important general two days earlier, and is only now drawing closer scrutiny from Congress and Pentagon officials.

But the storming of an airfield used by the American military so alarmed the Pentagon that it immediately sent about 100 troops from the 101st Airborne Division to establish security at the base. Army Green Berets from Germany also were shuttled to Djibouti, the Pentagon’s major hub in Africa, in case the entire base was in danger of being taken by the Shabab, an East African terrorist group affiliated with Al Qaeda.