HOUSTON — Driving in the United States and Europe is picking up a little. Refineries in China are buying more oil as that country’s economy reopens. Saudi Arabia and Russia ended their price war and slashed production, and U.S. oil companies are decommissioning rigs and shutting wells.

All those developments have helped push up oil prices modestly in recent weeks. On Monday, U.S. oil futures climbed 8% to settle at $31.82 a barrel, a price that would allow for some of the best oil wells in the United States to break even.

That may seem like a minor miracle given that the price is more than $60 above where it was about a month ago. On April 20, the U.S. oil futures contract fell below zero for the first time as some traders paid buyers to take oil off their hands.

“May, it seems, is a month when traders can finally sit back more comfortably for a moment and take a breath,” said Bjornar Tonhaugen, head of oil market research at Rystad Energy, a research and consulting firm. “But we warn that the second half of the year will not be met with precrisis oil prices again, as the gigantic oil stock overhang must first be worked down.”

Even after the recent rally, oil prices are roughly half of what they were at the beginning of the year. And the average price for regular gasoline in the United States is still a relative bargain at $1.88 a gallon, 97 cents less than a year ago, according to AAA.

Energy experts warn that oil prices may dip again if there is another surge in coronavirus cases and deaths as governments begin allowing businesses to reopen and encourage people to move about more freely.

Demand for oil and petroleum products fell sharply in recent weeks as people stopped commuting, airlines cut schedules and factories came to a halt. But there are some signs that demand for petroleum products is beginning to recover, especially the demand for gasoline.

U.S. oil production has already plummeted by 900,000 barrels a day since February, a 7% decline. Analysts said they expected the industry to cut an additional 2 million barrels a day by the end of the year as companies shut more wells and production from other wells declines naturally.