* U.S. shares mostly rise as oil surge lift energy stocks
* Oil rises 5 percent in biggest gain since early June
* Dollar falls on nagging worries about financial sector
* Commodities on track for biggest weekly gain since 1975 (Adds close of U.S. markets)
By Herbert Lash
NEW YORK, Aug 21 (Reuters) - Oil prices jumped almost 5.0 percent on Thursday in a big bounce in commodities that ignited inflation fears and sent bond prices lower, but oil's rally gave energy shares such a jolt they turned U.S. stocks higher.
Persistent worries over the U.S. financial sector knocked down the U.S. dollar and sparked a broad flight from risky trades that pushed the Japanese yen sharply higher.
The Dow and S&P 500 indexes rose as oil's surge propelled energy shares higher, even as fresh fears of more credit market losses on Wall Street kept gains modest and pushed the Nasdaq lower.
The Dow Jones industrial average <
> was up 12.78 points, or 0.11 percent, at 11,430.21. The Standard & Poor's 500 Index <.SPX> was up 3.18 points, or 0.25 percent, at 1,277.72. The Nasdaq Composite Index < > was down 8.70 points, or 0.36 percent, at 2,380.38.Oil prices surged driven by rising tensions between the United States and Russia, the world's No. 2 oil and gas exporter.
The gains in oil capped a rebound of more than $9 from lows earlier this week that put a dramatic end to a more than 20 percent slide in prices since mid-July, leaving analysts unsure if oil's next big move will be up or down.
"This is a geopolitically driven bounce," said Jim Ritterbusch, president of Ritterbusch & Associates in Galena, Illinois. "But it might be premature to say that we've seen the bottom as the market's focus could revert very quickly to demand deterioration."
DOLLAR SLUMPS
Oil's surge further worsened sentiment toward the dollar, which was already suffering from concerns over the viability of U.S. mortgage agencies Fannie Mae <FNM.N> and Freddie Mac <FRE.N>, and investment bank Lehman Brothers <LEH.N>.
"It's a problem for the dollar because it spotlights the financial system and obviously there's no chance that the Federal Reserve will hike rates in this environment," said Richard Franulovich, a senior currency strategist at Westpac Institutional Bank in New York.
The U.S. dollar index, a gauge of the U.S. currency's value against six major currencies, was on track for its worst one-day fall in five months. Against the yen, the dollar was headed toward its sharpest daily loss since July.
Investors sold dollars and swarmed back into precious metals, energy and agriculture futures. They were reminded that the arguments for buying commodities had not been weakened by the market's correction in recent weeks, but their had.
The U.S. Dollar Index <.DXY> fell 1.09 percent at 76.075. Against the yen, the dollar <JPY=> shed 1.22 percent at 108.45.
The euro <EUR=> rose 1.04 percent at $1.4896.
The Reuters-Jefferies CRB Index <.CRB> of 19 commodity futures rose 3.7 percent to cap a 6.2 percent gain so far this week, its biggest weekly percentage rise since July 1975.
"There was speculative excess in commodities that caused the market to move up too quickly," said Bill O'Neill, executive director of commodity consultancy LOGIC Advisors.
"That doesn't really alter the big picture which is that commodities have established themselves as an asset class and that global demand for them will continue to be strong, even though we had some demand destruction, obviously, in the energy sector due to high prices," he said.
U.S. crude <CLc1> gained $5.62, or 4.86 percent, to settle at $121.18 a barrel, the biggest percentage gain since June 6. London Brent crude <LCOc1> climbed $5.80 to $120.16.
December gold futures <GCZ8> settled up $22.70 at $839.00 an ounce.
Gold remains sharply down from near $1,000 an ounce in July. Physical demand for bullion from India responds to lower prices and has picked up ahead of the festival season in the world's largest consumer of gold.
Shares of Chevron <CVX.N> rose 2.4 percent to $88.52 and Exxon Mobil <XOM.N> advanced 2 percent to $80.35. The Standard & Poor's Energy Index <.GSPE> rose 2.3 percent.
"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.
Home finance giants Fannie Mae <FNM.N> and Freddie Mac <FRE.N> erased 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.
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.07 percent.
Bank shares struggled for much of the session as analysts predicted more mortgage-related write-downs on Wall Street.
The benchmark 10-year U.S. Treasury note <US10YT=RR> fell 8/32 to yield 3.84 percent. The 30-year U.S. Treasury bond <US30YT=RR> fell 11/32 to yield 4.47 percent.
Asian stocks fell on investors worried about the ability of the region's exporters to weather a widespread economic slowdown.
Japan's Nikkei share average <
> finished down 0.8 percent. Outside Japan, Asia-Pacific shares fell 1.4 percent, approaching a 17-month low touched on Tuesday, according to an MSCI index <.MIAPJ00000PUS>.(Reporting by Richard Valdmanis, Gertrude Chavez-Dreyfuss, Chris Reese in New York and Pratima Desai, Anna Stablum, Sitaraman Shankar in London and Eva Kuehnen in Frankfurt) (Reporting by Herbert Lash, Editing by Richard Satran)