Rising oil prices may be a drag on the economy, but they have been a boon for natural resources mutual funds.

During the third quarter of 2004, funds in that sector have soared, largely because of oil-related stocks that have taken off.

The funds have returned an average of 10 percent in the quarter that ended last week -- as high as 16 percent at the upper end -- according to results through Sept. 30 compiled by Lipper Inc., which evaluates fund performance. That average was ahead of the average gain for real estate, 7.84 percent, and for emerging markets funds, 7.73 percent, among others. Only gold-oriented funds had a higher average gain, 14.68 percent. By contrast, the Standard & Poor's 500-stock index was down 2.3 percent.

For investors who grabbed natural resources funds months ago, this was good news. But with oil prices hovering around record levels, and some analysts predicting their fall by early next year, some investors are wondering whether there is a way to take advantage of these highflying funds or whether they're getting ready to settle back to earth.

A number of analysts and portfolio mangers say that in the long run, the outlook for the sector remains bright. But for investors looking for short-term gains, oil-related stocks are unlikely to perform as they have in recent months.

Matthew Friedman, portfolio manager for Fidelity Select Energy, says that "you have to be judicious with oil prices so high." But he still thinks now is a good time to buy.

He says that while he expects the sector to continue to do well, the returns probably will moderate. "The growth next year will slow down, as I for one don't think the oil price will be this high next year," Friedman said. But he added: "The returns will be very good."

Tim Parker, an analyst for T. Rowe Price's New Era natural resources fund, says that now may not be the "optimal tactical point" to buy into the sector because oil prices are forecast to come down. But for long-term investors, he says, the prospects are good.

"I think in a couple of years, we're going to look back at this as a good time to invest," Parker said.

While many natural resources funds have focused more heavily on oil and gas industry stocks this quarter, others embrace abroader mix that includes precious metals and other commodities.

Whatever a fund's mix, analysts say that holdings in natural resources are an important way to balance a broader portfolio.

The past quarter, most natural resources funds with heavy investments in oil-related companies did well because of the high oil prices and beneficial conditions in the industry.

Worldwide demand for oil has been rising, particularly because of growth in China and the United States. At the same time, the world is pumping oil at near-capacity levels. Oil traders are nervous that if supplies are disrupted on a large scale anywhere in the world, other countries will not be able to make up the production.

As threats, both large and small, to oil production arise, oil prices have traded up. Most recently, rebels' threats of war in Nigeria helped push up prices.

Actual disruptions have the same effect. Hurricane Ivan, which halted production in the Gulf of Mexico, helped deplete crude-oil inventories in the United States and sent prices higher. Attacks on oil pipelines in Iraq and elsewhere have added to the unease.

But many in the oil industry remain uncertain how long high oil prices will remain. They look back at other times when prices reached record highs and note the collapses that have followed. Still, many analysts believe oil will stay relatively high through at least the end of the year before receding somewhat.

Jacques Rousseau, a senior analyst at Friedman, Billings, Ramsey Group Inc., says that the big oil companies' stocks generally remain good buys because their current valuations reflect the assumption that oil will stabilize at about $27 a barrel, lower than the $30 range that he and other analysts say they foresee. On Friday, the price of U.S. benchmark crude oil on the New York Mercantile Exchange closed at just over $50.

Rousseau says the sector is a good idea for a long-term investor. "If you are somebody who will buy a stock and hold it for three to five years, I think you can buy now," he said.

This past quarter, however, short-term investors did well.

For example, Friedman's Fidelity fund returned more than 9 percent for the quarter, according to Lipper. The fund's top holdings as of June included the biggest names in the oil business, such as BP PLC, Exxon Mobil Corp. and ChevronTexaco Corp. Top holdings also included oil-field services companies Schlumberger Ltd. and Halliburton Co.

Some analysts who expect oil prices to come down soon warn that oil company stocks will become a more mixed bag than during the past quarter.

If oil prices fall, smaller companies that are focused heavily on oil production, such as Occidental Petroleum Corp., will suffer, some analysts say. "It's too late" to invest in those companies, said Fadel Gheit, an analyst at Oppenheimer & Co. "This is the time to exit, not the time to enter." [See story, Page F4]

Gheit says that even if oil prices plunge, investments in larger, integrated oil companies such as Exxon Mobil should continue to provide strong returns. Those companies' non-production operations would help boost returns if oil prices sank, he says. Big oil company stocks also appeal to fund managers because the companies have been using their huge profits to pay large dividends and buy back stock.

To some analysts, the most appealing aspect of natural resources funds is that they are expected to do well in an environment in which high oil prices are dragging the broader economy. They also say that if supplies in some part of the world are disrupted and prices rise dramatically, triggering an economic downturn, investors in oil companies will have a buffer.

"Having energy investments provides a nice hedge against that," said Ken Kam, portfolio manager for the Marketocracy Masters 100 Fund, which includes some oil stocks. "But you only get the hedge if you buy companies that are dependent on sources of crude that won't be affected."

Kam suggests investments in companies that have multiple sources of oil in the event production is halted in one part of the world. Kam said he likes Marathon Oil Co. for that reason because its reserves are located in many regions.

Third-Quarter Mutual Funds Report