Oil rose above $78 a barrel on Tuesday as gains in the U.S. stock market boosted prices, outweighing earlier pressure from mild weather and the stronger greenback.

U.S. crude rose 86 cents to $78.86 a barrel by 2:25 p.m. EST. The New York Mercantile Exchange will combine prices for Monday and Tuesday into a single trading session because of the Martin Luther King Day holiday.

Brent crude rose 39 cents to $77.49 a barrel.

I do think the S&P 500 is the market's excuse for price recovery. Whether that establishes that the S&P trumps the stronger dollar and the direct fundamentals remains to be seen, said Tim Evans, energy analyst at Citi Futures Perspective in New York.

Wall Street on Tuesday boosted crude prices as investors bet that a Massachusetts Senate race could derail President Obama's healthcare reform plan. <.N>

Opinion polls showed that Massachusetts voters may replace the late Senator Edward Kennedy with a Republican, taking away the Democrats' 60-vote supermajority in the U.S. Senate.

The S&P Healthcare Index <.GSPA> climbed 2.1 percent on Tuesday, with Humana Inc and pharmaceutical company shares leading gains.

FUNDAMENTALS STILL WEIGH

However, high oil inventories and weaker demand due to mild winter weather were still a factor for oil prices, analysts said.

U.S. heating fuel demand is expected to be well below normal this week, according to the National Weather Service.

The Organization of the Petroleum Exporting Countries (OPEC) said on Tuesday that oil inventories are high enough to absorb any increase in winter fuel demand.

The group also cut its forecast for demand for its crude by 20,000 barrels per day to 28.59 million bpd in its monthly report, while leaving its forecast for world oil demand growth unchanged at 820,000 bpd.

A stronger dollar may also add some pressure to oil prices, with the euro falling to a four-week low against the dollar.

A rise in the value of the dollar often discourages investor interest in dollar-denominated commodities such as oil.

Japan Airlines Corp's <9205.T> bankruptcy filing on Tuesday may also have some impact on oil prices, some analysts said. The company said it would cut more than 15,000 jobs and unprofitable routes.

(Additional reporting by Robert Gibbons and Gene Ramos in New York, Ikuko Kao in London, Alejandro Barbajosa in Singapore; editing by Jim Marshall)