Two terrorists in Yemen made a big mistake a couple of weeks ago, when they attacked and tried to kidnap two U.S. embassy officers in that Middle Eastern country’s capital of Sana. The two Americans — one reportedly a Special Operation Commando and the other a C.I.A. agent — made sure that those two will not be kidnapping any more Americans, or anyone else, ever again.

Details of the incident, which took place April 24, are somewhat murky. Yemen has seen a number of attacks on Western interests in recent months, and the U.S. Embassy itself was the target of what intelligence officials called a “credible threat” in March.

On Wednesday, May 8, the U.S. embassy announced that it would be closed to the public until further notice as “a precautionary measure.”

“We continue to evaluate the security situation every day, and we will reopen the embassy to the public once it is deemed appropriate,” said U.S. State Department Spokesperson Jen Psaki.

The two Americans who worked out of the embassy were reportedly in an upscale district of Sana on April 24. The Hadda Street district is a favorite with foreigners in the Yemeni capital.

The two men, according to an account in The New York Times, were simply in a barbershop getting haircuts when the would-be kidnappers stormed in. But they came prepared. They opened fire on the armed kidnappers — killing two of them.

“We can confirm that, last month, two U.S. Embassy officers in Yemen fired their weapons after being confronted by armed individuals in an attempted kidnapping at a small commercial business in Sana,” State Department spokesperson Marie Harf told the Times. “Two of the armed individuals were killed. The Embassy officers are no longer in Yemen.”

A New York Times source, however, said one of the Americans was a lieutenant colonel with the Joint Special Operation Command, which oversees the elite commando units known as the Delta Force, Navy SEALs and the Air Force Special Tactics Squadron.

The source said the other American was a C.I.A. officer.

Of course, the possibility remains that the “barber shop” report is just a cover story, and that the pair were involved in some sort of covert operation. It would be unusual for two embassy workers to venture out into the city without an escort from armed security officers — though clearly in this case, the men themselves were armed.

Yemen media reported the shootings, but blamed unknown gunmen, without mentioning the Americans.