* China investment, retail sales growth slower than expected
* API says U.S. crude stockpiles rose unexpectedly in week
* U.S. dollar index rises to highest since December
* Supply overhang of 2014-17 virtually eliminated -OPEC (Adds data from trade association the American Petroleum Institute, post-settlement trade)
NEW YORK, May 15 (Reuters) - Oil prices settled a shade firmer after retreating from multi-year highs hit early in the day on Tuesday, supported by concerns that U.S. sanctions on Iran are likely to restrict crude exports from one of the biggest producers in the Middle East.
Brent crude oil settled at $78.43 a barrel, up 20 cents, or 0.3 percent, after reaching an intraday peak of $79.47 a barrel, up $1.24 and its highest since November 2014.
U.S. light crude closed 35 cents, or 0.5 percent, higher at $71.31 a barrel, also not far off the day's peak at $71.92, its highest since November 2014.
Prices pulled back in post-settlement trade after an industry organization said U.S. crude stockpiles built unexpectedly last week. U.S. crude dropped 6 cents to $70.90 a barrel, while Brent fell 22 cents to $78.01.
Trade group the American Petroleum Institute said crude stockpiles rose nearly 5 million barrels, compared with analysts' expectations for a 763,000-barrel draw. Official data from the U.S. Energy Information Administration is due Wednesday at 10:30 a.m. EDT 1/81430 GMT 3/8.
The difference between the two benchmarks briefly widened to more than $8 a barrel, the widest gap since April 2015, reflecting surging U.S. crude supplies and a greater geopolitical risk to Brent-based crudes.
"U.S. oil prices have flip-flopped on a strong dollar," said Phil Flynn, analyst at Price Futures Group in Chicago. "Brent is pricing in the idea that all the risk to supplies is overseas - there's a concern that all the supplies that are tight in Europe are only going to get tighter."
World oil prices have surged more than 70 percent over the last year as demand has risen sharply while production has been restricted by the Organization of the Petroleum Exporting Countries, led by Saudi Arabia, and other producers, including Russia.
The United States has announced it will impose sanctions on Iran over its nuclear program, raising fears that markets will face shortages later this year when trade restrictions take effect.
Iran will restart its uranium enrichment if it cannot find a way to save the 2015 nuclear deal with the European Union after the United States pulled out last week, Tehran's government spokesman said.
The tightening market has all but eliminated a global supply overhang that depressed crude prices between late 2014 and early 2017.
Surging prices were capped after China reported weaker-than-expected investment and retail sales in April and a drop in home sales, clouding its economic outlook even as policymakers try to navigate debt risks and defuse a heated trade dispute with the United States.
The data poses worries that near-record high refinery runs may be short-lived. China's refinery runs rose nearly 12 percent in April from a year earlier, to around 12.1 million barrels per day, marking the second-highest level on record on a daily basis, data showed.
Additionally, the market retreated as the U.S. dollar strengthened against other currencies to the highest since December. As the dollar strengthens, investors can retreat from dollar-denominated commodities like oil.
Despite these downward forces, the market retains support from OPEC and other producers' production cuts and U.S. sanctions on Iran.
OPEC figures published on Monday showed oil inventories in OECD industrialized nations in March fell to 9 million barrels above the five-year average, from 340 million barrels above the average in January 2017.
U.S. crude is trading at a hefty discount to Brent, the international marker, thanks to sharp rises in U.S. production to 10.7 million bpd, which has left the American domestic oil market well supplied.
U.S. shale oil production is expected to rise by about 145,000 bpd to a record 7.18 million bpd in June, the U.S. Energy Information Administration said on Monday.
(Additional reporting by Henning Gloystein in Singapore and Christopher Johnson in London; Editing by Marguerita Choy and Dan Grebler)