For months, fears of a terrorist attack on major petroleum facilities have helped drive crude oil and gasoline prices steadily upward. Now, just as prices were starting to retreat from record levels, a deadly assault in one of the industry's most vital hubs has raised those worries to new heights.

This weekend's hostage-taking episode in the Saudi Arabian city of Khobar was an attack on residents of a housing complex rather than refineries or terminals or pipelines, so it will have no direct impact on petroleum supplies. But it showed that Islamic militants are capable of striking in the heart of the kingdom's oil-producing region, so it is bound to intensify concerns about the vulnerability of tightly wound world markets to a supply disruption, analysts said yesterday.

"In terms of real physical flows of oil, it won't do anything," said Fareed Mohamedi, chief economist at PFC Energy, a Washington-based consultancy. "But from a psychological point of view, this just confirms the incredible fears in the market. This is reality, this is not just speculation. . . . And this is the main artery of oil. It's ground zero."

Not only was the attack the second in a month against Westerners working in the Saudi oil industry, but unlike the previous episode, which took place near a Red Sea petrochemical complex, this one came in the nation's eastern zone where the bulk of the kingdom's oil is piped to a densely-packed network of refineries and export terminals on the Persian Gulf. The episode is all the more worrisome, given Saudi Arabia's current status as the only nation with a significant amount of spare production capacity. Oil wells and refineries nearly everywhere else are producing flat out to meet growing global demand.

"The fact that you've had two in one month suggests that there is a concerted effort to target oil facilities in particular," said Simon Wardell, senior energy analyst at the World Markets Research Center in London. "So this will raise that risk element, the extra premium that's put on prices in case something very bad happens. And if something very bad does happen in Saudi Arabia, that could cause real shortages."

The attack came at a time when Saudi Arabia has vowed to use its vast capacity to bring down prices because of fears that soaring energy costs could derail the global economic expansion. Earlier this month, when crude prices surged to nearly $42 a barrel, Saudi officials announced that they would immediately increase production to about 9 million barrels a day from about 8.5 million, and raise output even further to whatever level was demanded by the market.

The Saudis are the only member of the Organization of Petroleum Exporting Countries capable of making such promises. Although the kingdom is no longer the world's biggest producer -- that distinction belongs to Russia -- it sits on about one-quarter of the world's reserves, and unlike Russia, whose wells are pumping as much as possible, the Saudis contend that they could easily ramp up production to 10.5 million barrels a day or more. Based on expectations that the Saudis would overcome objections from other OPEC members at a meeting scheduled for Thursday, crude oil slid as low as $39 a barrel last week.

"The signs of increased production coming into the market were beginning to calm things down, but this [attack] will once again increase the sense of risk and nervousness that has done so much to propel oil prices above $40 a barrel," said Daniel Yergin, chairman of Cambridge Energy Research Associates.

For the longer term, a big unknown factor is how many of the thousands of foreigners working in Saudi Arabia will feel obliged to leave. The Saudis are not as dependent on foreign expertise as they were 25 years ago; they have used their wealth to create a university system that has produced many petroleum engineers, "so they are much better prepared to operate with fewer foreign nationals," said Philip Verleger, an energy expert at the Institute for International Economics.

For that reason and others, Verleger said, the impact of this weekend's attack may produce only a short-term upward blip in prices. The Saudis "have built a lot of redundancy into their system," he said, so if one facility is disabled others can come on line fairly readily. Moreover, much of the recent run-up in prices has been caused by a shortage of gasoline refining capacity, and if Americans appear to be consuming less gasoline than expected now that the summer driving season is underway, gasoline prices will drop, which will drag crude prices down with them, perhaps to the mid-$30s, Verleger predicted.

But other experts were less sanguine. "The big fear is that someone will get a truck or boat or small plane and crash it somewhere vulnerable," like a refinery, said Michael Lynch, president of Strategic Energy and Economic Research, who conjectured that prices would shoot up $3 to $5 a barrel in the next couple of days before receding. "Although there's not that much of a chance that you would have a major loss of supply, even a minor loss of supply will hurt the market because it's just so tight right now."