US oil settles down 7 cents, or 0.1%, at $59.63 a barrel

Sergei Karpukhin | Reuters

Oil prices cooled on Friday as data from oilfield services firm Baker Hughes showed the decline in its oil rig count entered an eighth month.

U.S. crude settled down 0.1 percent, at $59.63 a barrel, paring earlier gains. Brent crude for August was flat at $63.20 a barrel.

Energy firms pulled three rigs from U.S. oil fields this week, the smallest drop in five weeks, data showed on Friday, a sign the collapse in drilling is coming to an end as crude prices recovered after falling 60 percent from last June to March.

It was the 29th straight weekly decline, bringing the total down to 628, the lowest since August 2010, oil services company Baker Hughes Inc said in its closely followed report.

In the latest week, drillers removed two rigs in the Permian, the biggest U.S. shale oil play in West Texas and eastern New Mexico, and three in the Bakken centered in North Dakota.

Read MoreCalculus on oil price changing as Iran talks wobble

Futures pared losses in late morning trade as investors awaited the outcome of Iranian nuclear talks which could lead to a big increase in the country's crude exports at a time when the market is already over-supplied.

Dealers also kept an eye on negotiations to try to avert a Greek debt default and avoid the nation's exit from the euro.

A Greek default would be likely to strengthen the dollar against the euro, providing headwinds for oil and other commodities priced in dollars, economists

Analysts and traders said the market was being pressured by a mix of bearish factors, including the possibility that Iran may strike a deal with Western powers to end economic sanctions. A resumption of Iranian crude exports would exacerbate a global over-supply.

"A significant amount of unneeded oil will flow into the global markets in a relatively short time frame as Iran has a large volume of oil sitting in floating storage that is likely to hit the market very quickly," said Dominick Chirichella of the Energy Management Institute.

Ole Hansen, senior commodity strategist at Saxo Bank, suggested such a deal could push the market down 5-10 percent.

Cramer: These oil stocks look cheap

A glut of unsold North Sea and West African barrels in the Atlantic Basin is weighing on Brent, with the physical market struggling to find homes for crude that loaded on to tankers weeks ago.

North Sea Forties crude fell to its lowest level since the 2008 financial crisis on Thursday.

Read MoreWant lower gas prices? Harold Hamm says do THIS

"There's a lot of crude oil that's trying to find a home ... That limits the potential for a crude oil rally and puts pressure on the price," said Olivier Jakob, managing director of Petromatrix.

Analysts said the U.S. products market was also weak. U.S. gasoline stocks unexpectedly built last week.

"The market is in trouble again. Two of the five (major oil futures) contracts are below key supports, and one of them is RBOB (gasoline) which is not a good sign," said Robin Bieber, a technical analyst at PVM Oil Associates.