(Repeats to widen distribution)
* Dollar pulls back from three-month high
* $50/bbl pivotal point for U.S. crude
* U.S. August crude contract expires on Tuesday
* Coming Up: API's U.S. oil inventory report at 2030 GMT
By Robert Gibbons
NEW YORK, July 21 (Reuters) - Crude oil futures clung to gains in volatile trading as the U.S. front-month August contract headed to expiration on Tuesday, with the weaker dollar providing support.
Weak U.S. RBOB gasoline futures curbed gains for crude, especially Brent, traders said, as expectations that inventories rose again last week as refiners continue to operate at a high utilization rate weigh on prices.
The dollar .DXY retreated from a three-month high against a basket of currencies on mild profit-taking. ID:nL5N1012N1
A rising dollar makes it more profitable for non-U.S. investors to sell dollar-denominated assets and a weaker greenback makes oil less expensive for consumers using other currencies.
"Seems like there is volatility with the U.S. August contract set to expire and the weak equities are not helping either," said John Kilduff, partner at Again Capital LLC in New York.
Expectations of more Iranian supply following last week's agreement on Tehran's nuclear program and concerns that economic worries in China and Europe will weigh on demand have put pressure on oil this month.
U.S. August crude CLQ5 was up 27 cents at $50.42 a barrel at 12:11 p.m. EDT (1611 GMT), having slipped to $49.77 intraday.
U.S. September CLU5 crude was up 32 cents at $50.76.
Front-month August crude dropped below $50 on Monday for the first time since April and the front-month price is down 15 percent in July.
"August WTI is a particular focus of attention ahead of today's expiration and we expect much gravitation at around the $50 mark," Jim Ritterbusch, president at Ritterbusch & Associates in Galena Illinois, said in a note.
Brent September LCOc1 crude was up 16 cents at $56.81, having swung from $56.33 to $57.44.
Brent's premium to September U.S. crude CL-LCO1=R was near $6 a barrel.
U.S. August RBOB RBc1 was off 2.26 cents at $1.9077 a gallon, as it trades between its 100-day moving average of $1.9524 and its 200-day moving average at $1.8591.
U.S. gasoline stocks were expected to have risen 1.0 million barrels last week, according to analysts surveyed by Reuters on Monday ahead of the weekly industry and government inventory reports due respectively late Tuesday and on Wednesday. EIA/S
Crude oil stocks were expected to have fallen 2.1 million barrels.
"Fifty dollars is almost a fault line for bulls and bears to battle it out, but if you want to choke off U.S. production, that price may have to move a bit lower. With $50 being that support level, this is where we will get some buying coming in," BNP Paribas analyst Harry Tchilinguirian said.