A double dose of news yesterday eased fears of petroleum shortages, causing oil and gasoline prices to continue retreating from their recent record highs.

The Organization of Petroleum Exporting Countries agreed to raise its output ceilings by 8.5 percent next month in a bid to keep the surge in energy costs from dampening the global economic expansion. Even more important, analysts said, were government figures indicating that U.S. gasoline demand was starting to fall in response to high retail prices.

Analysts said the announcement by OPEC, which came at a meeting in Beirut, was unlikely to have much immediate impact, in part because of persistent fears of terrorist attacks or other problems that might disrupt production during a period of extremely tight supply. But after rising initially, market prices began to slide in response to Energy Department data released in mid-morning showing an unexpected rise in crude and gasoline inventories, which suggested that supply conditions are somewhat less taut than previously believed.

Futures prices for U.S. benchmark crude fell 68 cents, to $39.28 a barrel, in New York. That is about $3 a barrel lower than the peak reached on Tuesday. Gasoline futures for July delivery fell 4.69 cents, to $1.2354 a gallon, the lowest price for such a wholesale contract since April 28.

Bush administration officials, who have grown increasingly anxious in recent weeks about the political and economic fallout from high gas prices, voiced satisfaction that yesterday's news might signal some relief for motorists in months ahead. "OPEC's announcement today, coupled with recent inventory and import data, should be viewed as positive developments for the oil markets," Energy Secretary Spencer Abraham said in a written statement.

The Energy Information Administration, part of Abraham's department, said in its weekly report that "while it is difficult to know what will happen in the near future, especially in light of recent events in Saudi Arabia and elsewhere in the Middle East, several key indicators suggest that gasoline prices may continue to fall in coming weeks," perhaps below $2 a gallon before long. The report emphasized, however, that consumers should not expect gas prices to fall back "anytime soon" to the $1.48-a-gallon national average seen at the end of last year.

Analysts generally agreed that fundamental factors are likely to push prices lower, but they cautioned that terrorist attacks could drive prices sharply upward, as happened Tuesday in response to the killing of 22 foreign workers in Saudi Arabia's main oil-producing zone last weekend.

"You can expect a gradual softening in prices, but all the risks are on the upside," said Simon Wardell, senior energy analyst at the World Markets Research Center in London. He said that for the next few weeks at least, "we can expect prices to stay high -- not necessarily over $40, but at least in the high 30s."

The announcement by OPEC fell somewhat short of market expectations. The 11-nation cartel said it will raise its quotas in July by 2 million barrels a day, to 25.5 million barrels, with an increase of 500,000 barrels a day planned for August if necessary. Total world demand is close to 80 million barrels a day.

"That decision is obviously helpful, even if it's only symbolic, because OPEC was already producing above its quota," said Robert J. Priddle, the former executive director of the International Energy Agency, an intergovernmental body based in Paris.

The more important development, Priddle said, is the stand taken by the Saudis, who are almost alone among OPEC nations in having enough spare capacity to increase production significantly. "It's clear that the Saudis are very concerned about oil at this price and would like to see the price come down," he said. "It appears they will increase production, almost no matter what OPEC does, and the OPEC decision gives them cover to do that."

In a teleconference with reporters in Washington, Adel Al-Jubeir, a foreign affairs adviser to the Saudi royal family, said there was an "understanding" reached at the OPEC meeting "that if additional supplies of crude were required, those members able to produce it would do so." Saudi Arabia, he said, is prepared to fulfill that role, having already lifted its production from about 8.5 million barrels a day to 9.1 million barrels a day this month.

But the Saudis have been making similar pronouncements for several days to little effect, because prices have been so dominated by forces in the gasoline market. Soaring demand for fuel, especially in the United States and China, has combined with limited refining capacity in the United States to spark worries that a major refinery failure or other supply disruption could cause a severe shortage during the peak summer driving season. Those concerns diminished to some extent when the Energy Department statistics showed that gasoline stocks had risen by more than 1 million barrels in the week ended May 28 from the previous week, to 204.3 million barrels, and that crude stocks also rose.

"The DOE data suggest that in the last four weeks, the growth rate in gasoline demand as been halved from what it was in the previous four and a half months," said Lawrence J. Goldstein, president of the Petroleum Industry Research Foundation. "If that continues, it will get us through the summer driving season. If there are no unscheduled outages, we're home free -- by the skin of our teeth."

The latest oil developments triggered political sniping from both parties. "Today's announcement should silence critics of this administration," Sen. Pete V. Domenici (R-N.M.), chairman of the Senate Committee on Energy and Natural Resources, said in a written statement. "Clearly the Bush administration holds sway with OPEC during this time of tight global supply and record-high prices."

Phil Singer, a spokesman for Democratic presidential candidate John F. Kerry, said: "Although OPEC's decision to boost production is welcome news, it comes after months of inaction by the White House on this issue. While the White House failed to act, U.S. gas prices have hit record highs, putting a vise on the economy and increasing the burden on millions of Americans."

Excess natural gas burns atop a tower at a refinery in the southern Iraq city of Basra. Crude oil prices continued to fall yesterday.Iraqi production is down 490 million barrels since the war began.

A strike cut production in Venezuela by 360 million barrels.

Venezuelan soldiers patrol the El Palito refinery complex, about 150 miles west of Caracas.