A presidential envoy personally warned Saudi Arabia last week of US fears of an imminent attack, days before suicide bombings killed 34 people, including seven Americans, US officials said on Wednesday.
The disclosure was made after the US, in a rare criticism, said Saudi Arabia "must deal with the fact that it has terrorists inside its own country" in the aftermath of the bombings.
US officials, who spoke on condition of anonymity, said President George W. Bush's deputy national security adviser, Stephen Hadley, went to Riyadh last week to deliver the warning.
White House officials would not confirm Hadley's trip, first reported by ABC News.
His Riyadh visit came after the State Department issued a May 1 warning for Americans to put off nonessential travel to Saudi Arabia because "information indicates that terrorist groups may be in the final phases of planning attacks against US interests in Saudi Arabia."
The US ambassador to Saudi Arabia, Robert Jordan, complained on Wednesday that the Saudi kingdom didn't respond quickly enough to US requests for more security at a compound attacked this week by the bombers.
White House spokesman Ari Fleischer essentially backed up Jordan's criticism. "As with many countries around the world, the fact is that Saudi Arabia must deal with the fact that it has terrorists inside its own country, and their presence is as much a threat to Saudi Arabia as it is to Americans and others who live and work in Saudi Arabia," Fleischer said.
The US has strong suspicions that al-Qaeda was behind the bombings. An FBI team was on its way to Saudi Arabia to help investigate the triple suicide bombings. Bush spoke to Saudi leader Crown Prince Abdullah on Tuesday.
While saying the US would push Saudi Arabia to "do more" against terrorism, Fleischer went out of his way to praise Saudi Arabia's cooperation. US-Saudi ties were strained after the Sept. 11 attacks because 15 of the 19 hijackers were Saudis.
Fleischer said the US was not reassessing its relationship with Saudi Arabia, suggesting this would be what the attackers want.
"The one thing the terrorists want more than anything else is to be able to attack the United States, to attack others in the region and force us into changes in our policies. That will not happen," Fleischer said.
The Saudi ambassador to the US, Prince Bandar, made the same point in a toughly worded statement.
"The target of the al-Qaeda terrorists is Saudi Arabia and the United States and the relationship that has benefited both our peoples," he said.
He added: "We say to the people of the United States, as your friend and ally, you can rely on us to do our part as we have done in critical times in the past. We will continue to hunt down the criminals, we will continue to cut off their finances and we will bring them to justice."
National security adviser Condoleezza Rice told reporters cooperation was good between the US and Saudi Arabia and the two countries would likely work even more closely now.