Yemenis gather at the site of a bomb explosion that targeted an army troop vehicle on its way to man a checkpoint on a street leading to two western embassies on May 9, 2014 in the capital Sanaa. Security forces have been on high alert in Sanaa since the army launched a highly publicised offensive against Al-Qaeda in its southern strongholds late last month, drawing open threats of retaliation. (Mohammed Huwais/AFP/Getty Images)

Two American government personnel were whisked out of Yemen last month after they fatally shot two suspected kidnappers in a commercial district of the country’s volatile capital, U.S. officials said Friday.

The Americans opened fire on armed Yemeni civilians to escape an apparent abduction attempt at barbershop, according to the New York Times, which identified the officials as a Special Operations commando and a Central Intelligence Agency officer.

The U.S. embassy in Yemen has been operating on a limited capacity in recent days as American officials there have sought to limit the movement and exposure of their personnel amid a flurry of threat warnings.

The State Department confirmed Friday night that it had flown out the two officials following the incident.

“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 district in Sanaa,” the State Department said in a statement. “Two of the armed individuals were killed.”

The CIA declined to comment on the incident. Officials at the Pentagon did not respond to inquiries late Friday. The incident made news in Yemen when it occurred a couple of weeks ago, but the reports did not identify the targets of the apparent kidnapping attempt as American officials.

Disclosure of the incident coincided with fresh signs of deteriorating security in Yemen, where a weak government has struggled to battle Islamist insurgents linked to al-Qaeda.

According to local news reports, at least seven people were gunned down after assailants opened fire at two checkpoints that lead to the presidential palace. Meanwhile, militants ambushed the convoy carrying the country’s defense minister outside the capital.

Yemen has become among the least permissive environments for U.S. officials in recent years. American military and intelligence personnel have played a crucial role in counter terrorism efforts in Yemen, regularly striking suspected militants with drones, and providing support to the country’s fledgling security forces.

American personnel in the capital live in a fortified building that used to be part of the Sheraton Hotel chain. Their movements outside the living quarters and the the heavily-guarded embassy are tightly limited.

Greg Miller contributed to this report.