The State Department said a gunman who opened fire on the US consulate in Jeddah, Saudi Arabia, and a local security guard working at the consulate were killed in an exchange of fire.
The motive for Wednesday's attack was not immediately clear, the department said.
The consulate went into lockdown as the shooting took place and no Americans or American staff were injured, it said.
The assailant was killed by Saudi security forces, the State Department said, referring questions to the Saudi authorities, who it said were investigating.
Saudi Arabia's state news agency, citing Saudi police, said the man had gotten out of a vehicle outside the consulate carrying a gun.
“Authorities took the initiative to deal with him as required by the situation,” the press agency said. It said the slain consulate security worker was Nepalese.