US oil settles down $1.30, or 2.18%, at $58.33 a barrel

An oil pump jack in the oil town of Gonzales, Texas.
Getty Images
An oil pump jack in the oil town of Gonzales, Texas.

Crude futures hit three-week lows on Monday as Greece shut its banks and imposed capital controls, causing widespread risk aversion, while Iran looked likely to extend nuclear negotiations with the West to export more of its oil into an oversupplied market.

The dollar surged against the euro to early June highs on worries over the Greek crisis before retreating in the New York trading session for crude, limiting the downside for oil. A softer dollar makes commodities priced in the greenback more affordable for holders of other currencies.

U.S. crude closed down $1.30, or 2.18 percent, at $58.33 a barrel. Brent crude was down $1.20 at $62.02 a barrel. It had fallen almost $2 in European trading to its lowest since June 5.

Read MoreThis could be the tipping point for oil prices

"It's all about Greece today. Also, the Iran deadline for a nuclear pact could be pushed out by a week or so from tomorrow, so it's a risk-off day," said Tariq Zahir, an oil bear at Tyche Capital Advisors in Laurel Hollow, New York.

Greeks woke up to shuttered banks, closed cash machines and a climate of rumors and conspiracy theories on Monday as a breakdown in talks between Athens and its creditors plunged the country deep into crisis.

It's a tough week ahead for Greece
It's a tough week ahead for Greece   

The euro proved broadly resilient though to Greece's moving one step closer to an exit from the single currency.

Some analysts said crude prices could weaken further as the Greek situation will not likely be resolved until a referendum at the weekend on whether to accept conditions for a bailout.

"This may be the time when we break lower and into the $50s for Brent as we have a full week of uncertainty," said Bjarne Schieldrop, head of commodity analysis at SEB in Oslo.

Read More Crude is about to breakout—here's why: BNP Technician

U.S. and Iranian officials said talks on a final accord nuclear pact for Iran would likely run past a June 30 deadline. The agreement is key to ending Western sanctions on Tehran's crude exports, allowing it to add to the global glut in crude supply.

Market participants will also be looking for estimates on U.S. crude supply-demand due on Tuesday from industry group American Petroleum Institute, ahead of government inventory numbers on Wednesday.

While trading will be shortened for the week by the U.S. Independence Holiday on Friday, there will be data from China and the euro zone.