As U.S. forces gather in the Persian Gulf to prepare for a war against Iraq, Saudi leaders have engaged in one of the Middle East's great conjuring acts: facilitating a U.S. attack while casting a veil over the role of U.S. forces in the kingdom that would help carry it out.

The diplomatic sleight of hand is a measure of the challenge facing the Saudi rulers as they seek to balance the conflicting demands of international realpolitik and domestic and other Arab public opinion. While ordinary Saudis are overwhelmingly opposed to a U.S. invasion of a neighboring Muslim country, Saudi officials say they have little choice but to go along with the plans of an increasingly assertive superpower.

The result, say analysts here, is political schizophrenia. For more than half a century, the Saudi royal family has looked to Washington for protection against its external and internal enemies, selling vast amounts of oil in exchange. But in more recent years, it has discovered the U.S. security umbrella is a curse as well as a blessing.

The presence of U.S. combat troops in Saudi Arabia has become an extraordinarily sensitive political issue here, skillfully exploited by Osama bin Laden and other antigovernment activists inside and outside the kingdom. For more than a decade, bin Laden has accused the Saudi royal family of violating an injunction of the prophet Muhammad by permitting "infidel forces" into the land of Mecca and Medina, the two holiest sites in Islam.

The issue became particularly acute after the 1991 Persian Gulf War. Hundreds of thousands of U.S. and other foreign forces were allowed to stage in Saudi Arabia before driving Iraqi forces from Kuwait. But Saudi fundamentalists had been promised the foreign troops would leave immediately after the conflict. When U.S. forces remained, bin Laden and others rang an alarm that helped give impetus to al Qaeda.

"It was our presence in Saudi Arabia that brought al Qaeda into being," said Charles Freeman, a former U.S. ambassador here. "We have gone from being a contributor to the defense of the kingdom to a factor in its destabilization."

Historically, Freeman said, Saudis saw the United States as "a wonderful partner" because it was a distant power without colonial designs in the Persian Gulf region. But developments since the Gulf War, and particularly since the onset of the war on terrorism, have changed that perception.

"Ordinary Saudis feel more scared of the United States than any other country," said Khaled Maeena, editor in chief of Arab News, Saudi Arabia's leading English-language newspaper. "People here see America as an agent of upheaval. The Bush administration is pushing its own agenda, and Israel's agenda, while negating our hopes and aspirations."

Maeena compared relations between Saudi Arabia and the United States to a "dysfunctional marriage." The political fallout from the war on terrorism has left Saudis and Americans feeling they have little in common, he said. The partners in this strained union bicker continuously. But still they remain together "for the sake of the kids" -- the oil-for-security bargain that has underpinned U.S.-Saudi relations since the founder of the modern Saudi state, King Abdulaziz, met President Franklin D. Roosevelt aboard a U.S. warship in the Suez Canal in 1945.

Unwilling to break with the United States, Saudi officials have sought to make the U.S. military presence here as invisible as possible. An estimated 8,000 U.S. soldiers and airmen are holed up on military bases scattered around the kingdom, well out of sight of Saudi citizens. The official Saudi news media barely mention the U.S. troops, portraying them instead as U.N. forces enforcing a "no-fly" zone in southern Iraq.

Hiding U.S. forces from Saudi eyes became even more important after five Americans and two Indians were killed by bomb at a Saudi National Guard training center here in the capital on Nov. 13, 1995, and 19 U.S. servicemen were killed June 25, 1996, in the bombing of the Khobar Towers apartment building used by U.S. military personnel in Dhahran, in eastern Saudi Arabia.

A series of attacks on foreigners have taken place in the past few months, including the killing of a British defense contractor last month that the U.S. Embassy blamed on terrorists. So far, there has been no mass exodus of Americans or other Westerners, although some dependents have left because of the threat of war.

As war appears to be drawing near, however, discretion is becomingly increasingly difficult. Last week, the Arab satellite TV network al-Jazeera carried reports from Saudi dissidents about the arrival of U.S. Special Forces troops at an airport in the northern border town of Arar, a 200-mile drive from Baghdad. Few Saudis said they believed the explanation of the defense minister, Prince Sultan, that the troops were in Arar to deal with Iraqi refugees.

"From the Saudi government's point of view, the ideal situation would be to let Americans know how much we are cooperating, while keeping the Saudi population completely in the dark," said a leading Saudi intellectual. "But you can't do that in an age of satellite television and the Internet."

According to U.S. military officials, the air war against Iraq would largely be run out of the Prince Sultan air base, a sprawling 250-square-mile compound 70 miles southeast of Riyadh that is home to about 5,000 U.S. troops enforcing the no-fly zone over southern Iraq. The base also served as the air command center for the war in Afghanistan. Most U.S. personnel moved there from Dhahran after the Khobar Towers bombing.

Saudi officials say they plan to review the U.S. military presence, and particularly the status of the Prince Sultan air base, after an Iraq war is over. Once Iraqi President Saddam Hussein has been ousted, a well-placed Saudi official said, the mission of the U.S. troops enforcing the southern no-fly zone will be over and they can "go home."

While the U.S. and Saudi governments attempt to iron out their differences, commentators on both sides are using increasingly inflammatory language to describe the state of relations between the countries.

"America has become a bully on a rampage," said a prominent Riyadh lawyer educated in one of America's finest law schools, who spoke on condition his name not be used. Other Saudis lambaste the Bush administration for its support of Israel and alleged indifference to the plight of the Palestinians, the most emotional foreign policy issue here. It is difficult to find anyone in favor of U.S. policy toward Iraq.

"We don't hate the American people, but we hate U.S. foreign policy, because it is killing people and bombing their cities," said Abdul Hai, a political science professor at King Saud University in Riyadh.

Some intellectuals in the United States, meanwhile, depict Saudi Arabia as a source of militant Islamic ideology that has inspired a generation of terrorists. Saudis are "active at every level of the terror chain, from planners to financiers, from cadre to foot soldier, from ideologist to cheerleader," an analyst for the Rand Corp., Laurent Murawiec, said at a Pentagon advisory board session last August.

Pentagon and State Department officials quickly distanced themselves from Murawiec's comments, insisting that they did not reflect government policy. Nevertheless, the damage was done, and the Rand briefing has become Exhibit A in popular Saudi complaints about the United States, along with President Bush's description of Israeli Prime Minister Ariel Sharon as a man of peace.

U.S. officials both here and in Washington go out of their way to stress the benefits of a stable U.S.-Saudi relationship. Even if troops stationed at the Prince Sultan air base are withdrawn, they say, a sizable U.S. military contingent will likely remain in the kingdom as technical advisers. In addition, the United States sells hundreds of millions of dollars worth of military equipment to Saudi Arabia every year.

"It is more important than ever for us to be here, both because of the access it provides and in order to help overcome the misunderstandings that have arisen," said Martin Dempsey, a general in charge of a U.S. training program for the Saudi Arabian National Guard.

The general and his staff are hunkered down in the heavily protected Eskan military base outside Riyadh, which is home to about 100 U.S. officers, 100 Defense Department civilians and 1,500 contract workers assigned to the Saudi Arabian National Guard. The Americans moved here after the bombing of their downtown offices.

U.S. troops are deployed in the Saudi desert in November 1990. Many Saudis resent the continuing U.S. presence.