Two officers at the US embassy in Yemen shot and killed a pair of armed Yemeni civilians who tried to abduct them last month, the US State Department said.
The incident comes amid mounting turmoil in Yemen, which has launched its biggest push against Islamist militants in nearly two years.
The officers, who were reported to be a CIA officer and a lieutenant-colonel with the elite Joint Special Operations Command, had left the country, said Marie Harf, a spokeswoman for the State Department. No other details were provided.
Citing unidentified US officials, The New York Times reported that the Americans were visiting a barber shop in an upmarket district in Yemen's capital, Sanaa.
Within days of the shooting on April 24, both Americans left with the approval of the Yemeni government, the paper reported.
It was unclear what the Americans were doing at the time of the shooting. Some officials said they were simply getting a haircut, playing down any suggestions they were engaged in a clandestine operation, the newspaper reported.
Last week, the US embassy in Sanaa closed temporarily because of attacks on Westerners. A day before Tuesday's closure, gunmen opened fire on three French security guards working with the European Union mission in the Yemeni capital, killing one and wounding another.
The US campaign of drone strikes in Yemen against the group al-Qaeda in the Arabian Peninsula is already a subject of seething resentment in Yemen, where people believe, with some evidence, that the strikes often kill nearby civilians as well as their targets.
This month, the Yemeni government has been waging an offensive against the militant group, and violence around the country has been on an upswing.
On Friday, gunmen attacked Yemen's presidential palace and tried to kill the defence minister in his car, selecting high-profile targets in apparent reprisal for the army's offensive.
Four soldiers were killed in a gun battle lasting up to an hour that broke out when militants attacked the gate of the palace in Sanaa, a security source said.
Sanaa was in lockdown after the gunfight, with checkpoints set up at all the main entrances into the capital.
State news agency Saba published a brief statement saying three security personnel were killed when a "terrorist group" attacked their patrol vehicle.
Reuters, Associated Press