By Joe Wallace

Oil prices slumped to their lowest level in nearly three months Tuesday, under pressure from a stalling recovery in demand and planned production expansions by OPEC that threaten to add to an existing glut of crude.

U.S. crude-oil futures slid 7.6% to $36.76 a barrel, hitting their lowest level since mid-June. Brent crude, the global gauge of oil prices, dropped 5.3% to $39.78 a barrel, the first time the international benchmark has fallen below $40 in nearly three months. U.S. crude was partly catching up with Monday's drop in Brent, when U.S. markets were closed for Labor Day.

Record oil imports by China, the return of automobiles to U.S. roads and steep production cuts fueled a rebound after crude prices crashed this spring. But Chinese purchases have slowed since mid-July, the comeback in American gasoline demand has stalled and the Organization of the Petroleum Exporting Countries is boosting output. All these factors have combined to pull prices back down.

"Right now the market is coming back to reality," said Eugen Weinberg, head of commodity research at Commerzbank. "The problem is that gasoline demand in the U.S. didn't continue to increase."

Shares of major energy producers were stung by the drop in crude prices, with the S&P 500 energy sector extending its year-to-date slide to about 45%.

Tuesday's lurch lower ended a stretch of calm in the oil market, which didn't move much in either direction over the summer. Some traders had been bracing for a decline in prices, which they said had been trapped in a narrow range partly by bets against volatility in the options market.

A strengthening dollar added to Tuesday's pressure on oil, making commodities bought and sold in dollars more expensive for buyers outside the U.S. A weaker dollar had buoyed oil for weeks, but a recent reversal in that trend is hurting raw materials prices. Falling crude prices also hit the currencies of oil-producing nations on Tuesday.

Falling crude prices also hit the currencies of oil-producing nations. The dollar gained 1.6% against Norway's krone, 0.9% against Russia's ruble and 0.6% against Mexico's peso.

High-frequency data in the U.S. show gasoline demand is around 8-10% below its level from this time last year and has stopped playing catch-up, Mr. Weinberg said. Meanwhile, inventories in China are brimming after refiners stocked up on cheap oil from May through July.

The volume of crude oil imported by China fell 7.4% in August from a month before, to 47.48 million metric tons, according to Australia & New Zealand Banking Group. Imports will continue to slip in September and October, according to Helge André Martinsen, senior oil analyst at Norway's DNB Markets.

Saudi Arabia's national oil company, commonly known as Saudi Aramco, cut most of its prices this weekend for crude exports to the U.S., Asia and Northwest Europe for October. Analysts said the decision signaled that the kingdom, which produced almost 10% of the world's crude in 2019, is taking steps to bolster flagging demand for its oil.

"You've had a fundamental driver [of oil prices], which is the uncertainty around the demand outlook still tied to Covid and the reopening of economies globally," said Harry Tchilinguirian, head of commodity research at BNP Paribas. "That uncertainty has been reinforced by the fact Saudi Arabia is reducing its selling prices, in particular to its main Asian market."

Saudi Arabia's official selling prices often set the tone for other major Gulf producers, Mr. Tchilinguirian added.

The pressure on prices is likely to build in the coming months, traders and analysts said. One reason is that OPEC and its allies are on track to ease the historic production cuts they imposed this spring.

Scheduled increases to production will add to global supplies of oil, when price declines show the cartel needs to implement more stringent cuts, said Edward Marshall, a commodities trader at Global Risk Management. "There is no real bright spots."

Another challenge facing the market: refiners are struggling to make money, prompting them to cut the amount of crude they buy to process into higher-value products. The gap between gasoline and WTI prices, a gauge of refinery profit margins known as the crack spread, fell 8% this year through Friday to $9.46 a barrel.

"Covid-19 has just absolutely killed the more inefficient refineries and now they have negative refining margins, so they can't work at all," said Bjarne Schieldrop, chief commodities analyst at Swedish financial group SEB. "You have refineries going out of business and a huge surplus of capacity."

Hedge funds and other speculative investors have cut net bets on higher U.S. crude-oil prices recently, pushing them during the week ended Sept. 1 to their lowest level since mid-May, Commodity Futures Trading Commission data show.

The next critical event for the oil market is likely to be the U.S. presidential election in November, according to Robert McNally, president of consulting firm Rapidan Energy Group. Traders would interpret a Joe Biden victory as likely to lead to a relaxation of sanctions on Iranian oil exports, which could add to supplies and weigh on prices, he said.

David Hodari

and Amrith Ramkumar contributed to this article.

Write to Joe Wallace at Joe.Wallace@wsj.com