Crude oil prices rose on Tuesday in technical, thin trading and lifted by stronger equities and lowered expectations about a quick return of Libya's oil exporting capabilities.

Strong U.S. heating oil and gasoline futures helped lift crude prices early as products were boosted by news of a Sunoco refinery restoring capacity after losing power and expectations weekly inventory reports would show slumping U.S. products stockpiles.

Expectations for a swift restoration of Libyan oil to the market were reduced by successes of troops loyal to Muammar Gaddafi's government in reversing rebel gains, adding lift to oil prices.

Brent crude futures for May delivery rose 36 cents to settle at $115.16 a barrel, bouncing off its early $113.52 low.

U.S. May crude futures rose 81 cents to end at $104.79 a barrel, snapping a string of three lower sessions.

Prices reached $105 after slumping to $102.70, where crude found support just below the 20-day moving average of $102.87, according to Reuters data.

Traders and brokers said U.S. crude had felt technical pressure after Thursday's $106.69 intraday peak that failed to reach the 2-1/2 year intraday high of $106.95 from March 7.

Recent low trading volumes have added to price volatility, even as the uncertainty about threats to both supply and global demand sent traders to the sideline, thinning volume.

Total U.S. crude trading volume was 412,711 lots, 48 percent below the 30-day average, according to Reuters data. Brent trading volume was 323,036, 36 percent below the 30-day average.

MIDDLE EAST TURMOIL

Continued protests and unrest in Yemen, Syria and news of Kuwait's death sentences for three people for being in an alleged Iranian spy ring kept worries about the potential for supply disruptions in the region in play.

U.S. stocks rose, also amid thin trading volume as the first-quarter 2011 draws to a close, erasing initial declines, helped by energy stocks and technology and retail sectors that were pressured after Japan's earthquake.

Wall Street rose despite news that U.S. consumer confidence fell in March in the face of higher fuel prices and that U.S. home prices fell in January.

Pump prices up 26 percent from year ago kept U.S. gasoline demand flat last week compared to the previous week and down versus year ago, MasterCard Advisors said.

Uncertainty about oil demand in Japan as the country struggles to deal with its post-quake nuclear crisis remained a factor helping to hem in oil prices.

We have two factors that are countervailing, said Harry Tchilinguirian, analyst at BNP Paribas.

There is a risk premium in the Middle East built in on risk of further contagion. On the other hand we have the fact Japan is a major component of the global supply chain, so the potential for a price correction in the second quarter remains.

INVENTORY REPORTS

U.S. crude stockpiles rose 5.7 million barrels last week, much more than analysts expected, the American Petroleum Institute said in its weekly report released late on Tuesday.

Gasoline stocks fell 2.0 million barrels and distillate stocks fell only 112,000 barrels, the API said.

Crude prices briefly pared gains after the report.

Ahead of the API report, a Reuters survey of analysts had estimated crude stocks would be up 1.8 million barrels, with gasoline stocks seen down 1.9 million barrels and distillate stocks down 600,000 barrels.

The API report is somewhat bullish due to the gasoline data. We have seen large drawdowns over the past several weeks, and if the trend does not reverse, supplies could become very tight just in time for the height of the driving season, said John Kilduff, partner at Again Capital LLC in New York.

The U.S. Energy Information Administration's inventory report at 10:30 a.m. EDT (1430 GMT) on Wednesday.

(Additional reporting by Nia Williams, Barbara Lewis, Florence Tan, Alejandro Barbajosa and Randy Fabi; Editing by Marguerita Choy)