By Nicole Friedman 

Oil prices extended their selloff Tuesday on concerns about a growing glut of crude oil and a potential nuclear deal with Iran.

Light, sweet crude for August delivery fell $1.30, or 2.5%, to $51.23 a barrel on the New York Mercantile Exchange. Brent, the global benchmark, fell 79 cents, or 1.4%, to $55.75 a barrel on ICE Futures Europe.

Both contracts traded at their lowest intraday prices since April.

Prices posted their largest declines since February on Monday on concerns about a continued oversupply of crude. Output from the U.S. and the Organization of the Petroleum Exporting Countries has increased in recent months, surprising some investors who had expected production to decline as low oil prices prompted producers to slash spending on new production.

Recent data showing higher-than-expected oil supplies, along with concerns about the crisis in Greece and the stability of China's stock market, have prompted some traders to pull back from bullish bets on oil. Money managers including hedge funds cut their aggregate bet on rising oil prices in the week ended June 30 to the smallest since April, according to the Commodity Futures Trading Commission.

"It's been three days of can't-catch-your-breath," said Michael Hiley, an energy trader at brokerage LPS Partners Inc., adding that traders got caught off-guard and had to close out positions once prices broke out of the narrow band they had traded in for several weeks.

"We were sort of stuck in a range for two months and then it's gone," Mr. Hiley said. "It's hard to pick a bottom here."

The WSJ Dollar Index, which tracks the U.S. dollar against a basket of other currencies, rose 0.8%. A stronger dollar makes oil more expensive for buyers using other currencies, weighing on demand.

Talks between Iran and six world powers were extended past Tuesday night's deadline to July 10. Many market participants expect a final deal with Iran to be reached, which would likely weigh on oil prices. A deal would lead to the lifting of sanctions on Iran's oil exports, allowing the country to sell more crude into an already-oversupplied global market.

ClearView Energy Partners LLC said in a note to clients that it sees an 80% chance that negotiations will conclude by July 10. If a mid-July deal is reached, ClearView said, it sees Brent prices in the fourth quarter of 2016 around $57.50 a barrel, compared with the U.S. government's $67 forecast. If no deal is reached, ClearView sees Brent at $70 a barrel in the fourth quarter of next year.

The U.S. Energy Information Administration is due to release its monthly supply-and-demand outlook later Tuesday.

U.S. production has been higher than expected in recent months, according to EIA data, and hit a 41-year high of 9.7 million barrels a day in April.

Platts said Monday that according to its industry survey, OPEC pumped 31.28 million barrels a day of crude in June, the highest level since August 2012. OPEC will release its official production data later in July.

Gasoline futures rose 0.6% to $1.9350 a gallon. Diesel futures fell 0.9% to $1.6931 a gallon.

Write to Nicole Friedman at nicole.friedman@wsj.com

Subscribe to WSJ: http://online.wsj.com?mod=djnwires