A security guard and a gunman were killed in an exchange of gunfire in front of the US consulate in the Saudi coastal city of Jeddah on Wednesday, officials said.
No Americans were harmed in the shooting outside the consulate, which was put under lockdown, the State Department said.
"At 6:45 pm (1545 GMT), a man stopped in a car in front of the consulate building and got out with a weapon in his hand," the official Saudi Press Agency quoted a police spokesman as saying.
"Security forces reacted... resulting in an exchange of fire that killed the assailant," it said.
A Nepalese security officer was wounded and later died, it said.
"We offer our sincere condolences to the family and loved ones of the deceased local guards member," the State Department said in a statement in Washington.
The State Department said that Saudi forces killed the assailant and that the United States was in touch with the kingdom as it starts an investigation.
"The consulate was appropriately locked down and no Americans were harmed in the attack," it said.
The attack occurred as Saudi Arabia welcomed some 1.8 million Muslim faithful for the annual hajj pilgrimage in the holy city of Mecca, some 70 kilometres (44 miles) from Jeddah.
The US consulate in the coastal city of Jeddah on the Red Sea has been the target of previous attacks, one on July 4, 2016, American Independence Day, when a suicide bomber blew himself up.
In December 2004, another attack left five people dead.
Jeddah has recently been a hub of US diplomatic activity as the United States and Saudi Arabia together try to mediate between warring generals in Sudan.
Secretary of State Antony Blinken visited Jeddah earlier in June when he met Crown Prince Mohammed bin Salman.
(Except for the headline, this story has not been edited by NDTV staff and is published from a syndicated feed.)