SANA, Yemen — The kidnappers pulled up in a pickup truck outside the Taj barbershop in an upscale neighborhood here in the Yemeni capital. One held an AK-47 assault rifle and the other carried a stun gun. As the men went inside, nearby shopkeepers heard shots.

Then a foreigner — tall, with the physique of a body builder, and holding a black gun — was seen standing over one of the mortally wounded attackers in the doorway of the barbershop, witnesses said. The foreigner kicked an automatic weapon out of the man’s hands, looked right and left down the street, jumped into a nearby sport utility vehicle and drove away.

Those new details emerged Saturday about a shooting last month in which the Obama administration said two Americans from the United States Embassy killed two armed Yemenis who were trying to kidnap them from the barbershop.

While much about the encounter remains unclear, a Yemeni official said Saturday that the two Yemeni assailants were part of a cell linked to Al Qaeda that had planned and executed several attacks on foreigners in the country. Whether by design or chance, the official said, the Americans had apparently disrupted a kidnapping ring that government officials blame for killing a Frenchman last week, kidnapping a Dutch couple last year, trying to assassinate a German diplomat last month, and attacking the central prison here in February, freeing 19 inmates.