Oil prices whipsawed as an OPEC deadlock raised the prospect that the alliance could fail to come to agreement about limits on production, leading big producers to open the taps.

Futures for West Texas Intermediate, the main grade of U.S. crude, retreated 0.5% to $74.68 a barrel on Tuesday after earlier shooting up to their highest level in six years. Brent crude, the benchmark in global energy markets, skidded 1.7% to $75.85 a barrel having initially rallied when the OPEC meeting was called off on Monday.

Crude prices have advanced almost 60% this year, a surge powered by a revival in consumption of fossil fuels as vaccines roll out and major economies unlock. The Organization of the Petroleum Exporting Countries and its allies, led by Russia, have continued to hold millions of barrels a day in the ground each day, limiting supplies.

Investors have also played a role in pumping up prices, snapping up futures and options contracts to bet they will keep marching higher.

Drivers are feeling the pinch at the pump. Heading into the July 4 weekend, Americans faced the steepest gasoline prices in nearly seven years at a national average of over $3 a gallon.

Higher prices have started to cause jitters in energy-hungry economies. Some officials worry the extra expense of oil could add to inflation and hold back the recovery from Covid-19.

After meeting OPEC leaders in late June, Indian Minister for Petroleum Dharmendra Pradhan said he was concerned that higher oil prices were hurting consumers. India is the third-largest oil consumer in the world.

Demand for oil is expected to keep rising back toward pre-pandemic levels. But the failure of OPEC and its allies to agree on a plan to boost output and tame the rally has left the supply outlook uncertain. The United Arab Emirates refused to sign up to the Saudi Arabia-backed strategy, prompting the group to cancel Monday’s planned meeting.

In the short run, analysts say failure to release bottled-up crude will tighten supplies further because output quotas for August will remain in place.

There are three potential courses for OPEC and its allies, said Hans van Cleef, senior energy economist at ABN Amro Bank. With complaints from customers intensifying, he thinks there is a 50% chance that the cartel reaches a deal to raise output in August.

In another scenario, which Mr. van Cleef considers unlikely, the group sticks with its existing quotas and prices keep rising. The third possibility is that the cartel, which came together to buttress the market when oil prices tanked at the start of the pandemic, fails to agree. Crude prices would slump back to about $50 a barrel, Mr. van Cleef said.

The U.S. has pushed the cartel to reach a deal that would allow output to rise, cooling the surge in prices. “Administration officials have been engaged with relevant capitals to urge a compromise solution that will allow proposed production increases to move forward,” Reuters reported a White House spokesperson as saying Monday.

“The market needs to see supply increasing,” Warren Patterson, head of commodities strategy at ING Groep, said in a note. Without a hike to output, global oil inventories will fall by two million barrels a day in the third quarter and by more than that in the fourth, he estimates.

This summer it’s harder than ever to rent a car in the U.S., especially at popular vacation destinations. To learn what’s behind the spike in rental car prices, WSJ speaks with an industry analyst and WSJ’s Nora Naughton. Photo: Luke Sharrett/Bloomberg The Wall Street Journal Interactive Edition

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