Two royal guards were shot dead and three others were wounded on Saturday when a gunman opened fire outside the Saudi royal palace in Jeddah, the interior ministry said.
Guards killed the gunman, who was identified as 28-year-old Saudi national Mansour al-Amri.
“An outpost of the royal guard came under fire by a person who got out of a Hyundai car,” the interior ministry said in a statement run by state media. “He was immediately dealt with and his cowardly act also resulted in the martyrdom” of two guards, it added.
A Kalashnikov assault rifle and three Molotov cocktails were found on the attacker.
The royal palace in Jeddah is used for official business during the summer. Saudi King Salman is currently on a state visit to Russia. The whereabouts of Crown Prince Mohammed bin Salman are unknown.
The kingdom has been the target of several attacks carried out by the so-called “Islamic State” (IS) group this year. Most attacks have targeted security forces and the country’s Shiite minority.
The attack comes after Saudi security forces on Thursday conducted raids an a suspected IS cell, killing two suspected militants and arresting five others.
Last month, Saudi officials said they had disrupted an IS plot to carry out an attack on the defense ministry in the capital Riyadh.
In June, security forces foiled a plot to blow up the Grand Mosque in Mecca, Islam’s holiest site.