Two people were killed when an armed man exchanged fire with Saudi Arabian security forces and guards near the US consulate in Jeddah Wednesday.
The US State Department said incident led to the deaths of the gunman and a security guard, but no Americans were harmed in the incident.
"A person in a car stopped near the American Consulate building in Jeddah Governorate and got out of it carrying a firearm in his hand, so security authorities took the initiative to deal with him as required, and the exchange of fire resulted in his death," a spokesperson for the Makkah Region police said.
A Nepalese worker in the consulate's private security guards was injured and subsequently died, state news agency SPA reported.
Investigations are underway into the shootings.
"The US Embassy and Consulate remain in contact with Saudi authorities as they investigate the incident," a State Department spokesperson said.
The consulate has been targeted several times in recent years. In 2016, a suicide bomber was killed and two people were wounded in a blast near the compound.
And in 2004, five people stormed the US consulate with bombs and guns, killing four Saudi security personnel outside and five local staff within. Three of the attackers were killed in the assault and two were captured.
The 2004 attack in Jeddah followed other deadly bombings and shootings against expatriate compounds, Westerners working in the kingdom and other targets that were part of an al Qaeda campaign aimed at ousting the ruling Al Saud family.
Reporting by Reuters