The "fear factor" in world oil markets is greater than ever after the weekend attack on foreigners in Saudi Arabia, and energy experts predict that it will keep oil and gasoline prices high for weeks, months or even longer, casting a shadow over the global economic expansion.

U.S. crude oil futures prices increased by nearly $2.50 a barrel to close at a record $42.33 yesterday on the New York Mercantile Exchange, and gasoline futures jumped 6 cents a gallon. Crude oil futures in London rose by a similar amount.

It was the first chance traders in the world's biggest oil markets had to respond to the killing of 22 people in the heart of Saudi Arabia's oil-producing eastern region, and it demonstrated concern about the vulnerability of tautly stretched global supplies to further terrorist attacks.

"What you're seeing is potential fears becoming reality, and that gets factored into prices," said Lawrence J. Goldstein, president of the Petroleum Industry Research Foundation in New York. "It particularly gets priced when you're moving into peak demand season, and when capacity is fully utilized, and when there are no cushions to absorb surprises."

The upshot, as yesterday showed, is that geopolitical considerations are overwhelming supply-and-demand factors in setting oil prices. Based purely on fundamentals, such as inventory levels and planned global production, crude oil ought to be trading as low as $30 a barrel, many experts agree. So with additional production due, prices may fall somewhat in coming weeks, said Adam Sieminski, an oil analyst at Deutsche Bank in London.

"But if there's a fire or explosion at a refinery, or more terrorism in Saudi Arabia, the price will stay high," Sieminski said. "It's a struggle between the fundamentals and the fundamentalists."

Thus the markets largely ignored yesterday's news that key members of the Organization of Petroleum Exporting Countries renewed recent promises to approve a substantial increase in the group's production quotas. The Saudi oil minister, Ali al-Naimi, who has promised that the kingdom would pump as much as the market needs, repeated that he expects the organization to raise its output ceiling by 2.5 million barrels a day, or about 11 percent. "OPEC will do its best to make the fundamentals right," he said in Beirut, where the organization is scheduled to meet Thursday, according to the Associated Press.

Those assurances did little to assuage market worries about the dangers to production in Saudi Arabia, which has a quarter of the world's oil reserves and is the only nation with a significant amount of spare capacity. The weekend attack was especially unnerving because it was near a cluster of huge ports and refineries on the Persian Gulf through which most Saudi oil flows.

Saudi officials have contended that by attacking a "soft" target -- a housing complex -- terrorists have shown that they are incapable of striking at the kingdom's heavily guarded processing plants and terminals. "None of the terrorists has reached any of the oil facilities," Sheikh Ahmad Fahd al-Ahmad al-Sabah, the Kuwaiti energy minister, told reporters in Beirut, according to Bloomberg News. "I'm not worried about the Saudi facilities."

But the Saudis' vulnerability has aroused increasing concern in recent months, partly because of the book "Sleeping with the Devil" by former CIA officer Robert Baer. The book highlights the risks to the giant Ju'aymah terminal, which ships an average of 4.3 million barrels a day, or nearby Ras Tanura, which pumps slightly more; or the thousands of miles of above-ground pipelines connecting wells to refineries and ports. "The choke points are too many to count," Baer wrote, citing commando boats, homemade fertilizer bombs and dynamite as threats.

Hedge funds and other speculators in the futures market have driven prices sharply upward in response to a series of events including the breakdown of an Iraqi pipeline in mid-March, the Madrid train bombing the same month, attacks on Iraqi oil terminals and pipelines and the killing of foreign workers in a Saudi Red Sea port on May 1. Before those events, crude prices were in the low $30s, noted Sarah Emerson, head of Energy Security Analysis Inc., a consulting firm in Wakefield, Mass.

"If someone can fly planes into buildings, they can fly planes into a production facility," Emerson said. "So it's not irrational that there's this fear premium in the market."

The fact that Saudi Arabia is being targeted amplifies the premium because of the country's spare capacity, Emerson said. "If you take out Saudi Arabia's capacity, even only for a couple of months, you have a sort of double impact. You've removed some actual production, but you've also made it impossible to replace the lost production. If you take out production in Nigeria, in theory the Saudis can ramp up production to make up that shortfall."

The deeper problem, other experts said, is that the incidents occurred at a time when markets are already tight because of rising global demand, a shortage of gasoline refining capacity and other problems that have made prices far more sensitive to supply disruptions.

"This is a big change from the '70s and '80s and most of the '90s," Goldstein said. "OPEC historically has had 6 to 8 million barrels a day of spare production capacity. Today, it's less than 2 million barrels a day. Moreover, that is in the context of demand that is now 80 million barrels a day, not 70 million as it was before."

The situation will last at least through summer, Goldstein predicted, when a drop in gasoline demand will finally put a bit of slack into the system.

The danger to the global economy is not as great as it was during the oil crises and gasoline shortages of the 1970s. In inflation-adjusted terms, oil prices are well below where they were then, and industrial economies have stockpiled large amounts of oil for emergencies. But higher energy prices act as a sort of tax on oil-importing countries, and Bush administration officials are concerned that a sustained $40-a-barrel price would slow growth in the United States, Europe, Japan and other major economies.