Monday’s first bombing, near the US consulate in Jeddah, was carried out not by a Saudi but by a “resident foreigner,” General Mansour al-Turki, the Interior Ministry spokesman, told Al-Arabiya.
Millions of expatriates, many from Muslim-majority nations in the Middle East and Asia, work in the kingdom.
Turki told state Al-Ekhbaria news channel that the suspect, in his 30s, was closer to a mosque in the area than to the American consulate.
“Investigations (are) ongoing to find out the goals and motives of the bomber,” said Turki.
He also said on the news channel’s Twitter account that “devices that failed to explode (were) found in the vicinity of the site”.
The American embassy in Riyadh reported no injuries among US consulate staff.
The interior ministry said security personnel became suspicious of the man near the parking lot of a hospital which is across from the US diplomatic mission.
When they moved in to investigate at around 2:15 am (2315 GMT Sunday) the man “blew himself up with a suicide belt”, the ministry said.
A picture carried by the Sabq online newspaper, which is close to authorities, showed a large body part lying on the ground between a taxi and the open door of another car that was peppered with holes.
The attack coincided with the July 4 Independence Day holiday in the United States.
“The US embassy and consulate remain in contact with the Saudi authorities as they investigate the incident,” it added, urging Americans to “take extra precautions when travelling throughout the country”.
IS leader, Abu Bakr al-Baghdadi, has called for attacks on Saudi Arabia, which is taking part in the US-led coalition bombing the jihadists in Syria and Iraq.
The group also considers Shiites to be heretics.
Despite the upsurge in attacks against Saudis, foreigners have rarely been targeted in recent years.