By Steven C. Johnson

U.S. crude oil jumped more than $5 a barrel on rising tensions between the United States and energy behemoth Russia and the weaker dollar. Shares of Exxon Mobil rose 2 percent and were one of the biggest boosts on the Dow and S&P.

Bank shares struggled for much of the session as analysts predicted more mortgage-related write-downs on Wall Street.

"Oil stocks had fallen quite sharply during the decline, so there's a bit of a relief rally going on right now," said John Praveen, chief investment strategist at Prudential International Investment Advisers in Newark, New Jersey,

Crude oil had dipped below $113 a barrel earlier this month after soaring to a record high above $147 in mid-July.

The Dow Jones industrial average <.DJI> was up 12.62 points, or 0.11 percent, at 11,430.05. The Standard & Poor's 500 Index <.SPX> was up 3.17 points, or 0.25 percent, at 1,277.71. The Nasdaq Composite Index <.IXIC> was down 8.70 points, or 0.36 percent, at 2,380.38.

Energy shares rose with the price of oil. Chevron rose 2.4 percent to $88.52 and Exxon Mobil advanced 2 percent to $80.35. The Standard & Poor's Energy Index rose 2.3 percent.

Home finance giants Fannie Mae and Freddie Mac came back from earlier losses of about 20 percent as growing speculation of an imminent government bailout forced investors to buy back shares to exit bets on a further decline.

"Those stocks have been pounded. When they consolidated, I think you had a lot of shorts that were willing to cover," said Marc Pado, U.S. market strategist at Cantor Fitzgerald & Co in San Francisco. "People were saying, 'Let's not get too greedy here."'

The two companies, which own or guarantee about half of outstanding U.S. mortgages, are considered a pillar of the U.S. housing market, and investors are eager to see what sort of rescue they might get from the government.

Fannie shares rose 10.2 percent to $4.85 while shares of Freddie Mac dipped 2.8 percent to $3.16.

Other financial shares were lower, with the S&P Financial index <.GSPF> down 1.1 percent. JPMorgan Chase lost 2 percent to $36.26 while American International Group , the world's largest insurer, slid 4.9 percent to $19.78 amid a slew of negative reports on the financial sector.

The financials were hit after Citigroup analyst Prashant Bhatia widened his third-quarter loss estimate for Lehman Brothers and cut his quarterly earnings view for Goldman Sachs and Morgan Stanley .

But financial shares pared losses, analysts said, led by Lehman Brothers after Ladenburg Thalmann & Co analyst Richard Bove raised his rating on Lehman to "buy" from "neutral," saying the investment bank may become a hostile takeover target.

"Talk of a possible Lehman takeover was one of the catalysts for the turnaround. It looks like there is some bottom-fishing going on," said Praveen.

But he said the market was still struggling with "a lot of concern and anxiety," with investors "concerned about more bad news to come" in the banking sector.

Goldman shares dropped 1.2 percent to $156.42 and Morgan Stanley lost 0.9 percent to $37.06. Lehman shares finished down 0.1 percent at $13.72, after earlier falling as low as $12.54.

Also on Thursday, the Conference Board said its index of leading indicators fell 0.7 percent last month, its worst monthly slide since August 2007.

The data "does tend to lead stocks directionally," said Jack Ablin, chief investment officer at Harris Private Bank in Chicago, calling the number "another nail in the coffin for stocks in the near term."

Trading volume was light on the New York Stock Exchange, with about 911 million shares changing hands, below last year's estimated daily average of roughly 1.90 billion, while on Nasdaq about 1.54 billion shares traded, also below last year's daily average of 2.17 billion.

Declining stocks outnumbered advancing ones by about 1.3 to 1, while on the Nasdaq decliners beat advancers by about 1.7 to 1.

(Additional reporting by Walter Brandimarte; Editing by Leslie Adler)