The warning comes two weeks after US-allied Saudi Arabia said it had shot down a ballistic missile fired by Houthis from Yemen
The US State Department on Tuesday warned citizens to "consider the risks" when travelling to Saudi Arabia due to threats from militants and the risk of ballistic missile attacks on civilians by rebels in Yemen.
The warning comes two weeks after US-allied Saudi Arabia said it had shot down a ballistic missile fired by Houthis from Yemen towards the Saudi capital Riyadh. The missile, which the Houthis said was in response to Saudi-led air strikes on civilians in Yemen, was shot down near Riyadh airport without causing any casualties.
"Terrorist threats persist throughout Saudi Arabia, including in major cities such as Riyadh, Jeddah, and Dhahran, and attacks can occur without warning anywhere in the country," the State Department said in the warning, which was also posted on the US embassy's website.
"Terrorist groups, including the Islamic State of Iraq and Syria (IS) and its affiliates have targeted both Saudi and Western government interests, mosques and other religious sites (both Sunni and Shia), and places frequented by US citizens and other Westerners," it added.
In October, two Saudi guards were shot dead and three others injured when a gunman drove up to the gate of the royal palace in the Red Sea city of Jeddah and opened fire.
Saudi Arabia is leading a coalition of Arab states that intervened in Yemen in 2015 after the Houthis marched on the interim headquarters of the internationally recognised president, Abd-Rabbuh Hadi, in the southern port of Aden, forcing him to flee.
The US warning also comes amid widespread concern over an ongoing Saudi purge, which has led to accusations of torture and the imprisonment of several Saudi princes and prominent businessmen.
Last week, US diplomats and a Saudi doctor reported that at least 17 people needed hospital treatment after enduring severe beatings during the crackdown on alleged corruption.