By Barani Krishnan
NEW YORK (Reuters) - Oil prices remained under pressure on Tuesday, with Brent settling lower and U.S. crude near flat, as worries about swollen U.S. crude stockpiles cut price gains from an early rally on security scares in the Middle East and a weak dollar.
After an early rally, selling pressure grew as investors worried about record high U.S. stockpiles. After the market closed, the American Petroleum Institute (API), an industry group, reported that U.S. crude inventories rose to a record high for the 16th straight week.
U.S. crude settled up 7 cents at $57.06, after running to as high as $57.83.
Brent, the more widely-used global oil benchmark, settled down 19 cents, or 0.3 percent, at $64.64 a barrel, after rallying to as high as $65.49.
Earlier, oil had rallied as Iranian forces boarded the Marshall Islands-flagged MV Maersk Tigris in the Gulf after firing warning shots across the bow. Saudi-owned Al Arabiya television initially said the vessel was a U.S. ship.
"Tensions are so high in that region with the impending Iran-U.S. nuclear deal that any event implied to be U.S.-linked has an immediate effect on oil prices," said John Kilduff, partner at New York energy hedge fund Again Capital.
Jets from a Saudi-led alliance bombed the runway of Yemen's Sanaa airport to prevent an Iranian plane from landing, Saudi Arabia said, as fighting across Yemen killed at least 30.
The dollar's drop to an eight-week low also supported oil prices. The greenback slumped after a weak U.S. consumer confidence report for April left investors cautious about a Federal Reserve meeting this week.
Oil has gained around 20 percent this month for its strongest recovery since the selloff in oil between June and January. The rally has been tempered, however, by a stubborn global supply glut.
Feeding these fears, the API reported that U.S. crude inventories rose by 4.2 million barrels last week, almost 2 million barrels more than forecast in a Reuters poll, to a record 485.4 million barrels.
Stocks at Cushing, Oklahoma, the delivery hub for U.S. crude futures, fell by 162,000 barrels, cushioning some of the negative impact from the data.
"Amid all the bearish sentiment, the Cushing data provides a hope for bulls that storage tanks for U.S. crude aren't overflowing as yet" said Phil Flynn, analyst at the Price Futures Group in Chicago.
"That's what everyone will be watching for tomorrow," he said, referring to official stockpiles data due on Wednesday from the government.
(Additional reporting by Himanshu Ojha in London and Florence Tan and Jacob Gronholt-Pedersen in Singapore; Editing by Marguerita Cho, Chris Reese and David Gregorio)