Oil retreated on Thursday, pressured by gloomy U.S. economic data, but dollar weakness and supply concerns sparked by renewed violence in the Middle East helped limit losses.

Unrevised first quarter U.S. GDP data disappointed investors who had been expecting an upward revision while corporate profits unexpectedly contracted and jobless claims rose.

However, crude remained in a tight range close to $100 barrel where it has been for three weeks, and analysts saw longer-term appetite for energy as robust.

It's very range bound, it's been pressured by European debt concerns and poor data, said David Jones, chief market strategist at IG Index.

But there's massive appetite for oil, and whenever we have bad data, usually some better news comes soon after, so we see (U.S.) crude trading at $110 in coming months.

As of 1319 GMT U.S. crude for July was down 25 cents to $101.07. Brent crude for July was down 14 cents to $114.79 per barrel.

Crude oil had gained sharply on Wednesday as traders initially focused on an unexpected drop in U.S. distillate stocks.

However the figures from the Energy Information Administration showed domestic crude stocks rising, countering expectations of a fall, which underlined the gloomy outlook for demand.

The net result was that there was a build in inventories, so I think the move was a bit overdone yesterday, Simon Wardell, oil analyst at Global Insight said.

Both benchmarks rose around 2 percent on Wednesday to close at their highest since May 10.

Fears of spreading turmoil in the Middle East were rekindled by a brewing civil war in Yemen as dozens were killed in overnight gun battles.

Analysts said the tensions in the region have added a $10-$20 security premium to oil prices, as investors focus on risks to supply.

The dollar retreated against the euro and slipped against a basket of currencies, making commodities priced in the greenback more attractive to consumers using other currencies, and preventing sharper losses.

Analysts were divided over the longer-term direction of oil prices, as upward revisions of price forecasts by Wall Street banks Goldman Sachs and Morgan Stanley earlier this week deepened the divide between the bulls and the bears to levels unseen since oil prices peaked in 2008.

(Additional reporting by Francis Kan in Singapore; editing by Jason Neely)