By Rodrigo Campos

NEW YORK (Reuters) - Crude oil futures rose on Thursday, adding to the previous session's rally on optimism over an OPEC plan to curb output, while stocks fell as Deutsche Bank tumbled after a report said trading clients have withdrawn excess cash and positions held in the largest German lender.

Energy stocks fared better than the rest of the market as oil prices rose. The Organization of the Petroleum Exporting Countries agreed to cut output to a range of 32.5 million - 33.0 million barrels a day from the group's current estimate of 33.24 million barrels.

But the mood elsewhere was sour as Deutsche Bank, despite saying it was confident clients know its financial position is stable, saw its U.S.-traded shares hit a record low of $11.185. The stock closed down 6.7 percent at $11.48 in record volume.

The slide, alongside a grilling of Wells Fargo's chief executive by U.S. lawmakers amid a call for the bank to be broken down due to a scandal over its opening of client accounts without agreement, weighed heavily on bank stocks.

The S&P 500 bank index <.SPXBK> fell 1.6 percent and was on track to lose more than 5 percent this month. Wells Fargo <WFC.N> fell 2.1 percent to $44.37.

"This Deutsche Bank story is really casting a very long shadow over equity markets," said Peter Kenny, senior market strategist at Global Markets Advisory Group, in New York.

The immediate cause of Deutsche's crisis is a fine of up to $14 billion from the U.S. Department of Justice for its sale of mortgage-backed securities.

"There is very little give in the system for a significant disruption and if investors move down that road where they once again become 'risk-off,' then the first line of fire is going to be these large money center banks," said Kenny.

He said the OPEC deal was preventing the equity market from a meltdown.

"The OPEC announcement certainly was well-received by the market and the long beleaguered energy sector has found some tailwind after so many quarters of disappointing earnings."

The Dow Jones industrial average <.DJI> fell 195.79 points, or 1.07 percent, to 18,143.45, the S&P 500 <.SPX> lost 20.24 points, or 0.93 percent, to 2,151.13 and the Nasdaq Composite <.IXIC> dropped 49.39 points, or 0.93 percent, to 5,269.15.

The European oil and gas index <.SXEP> soared 4.4 percent on its best day in three months, but the pan-European STOXX 600 index <.STOXX> closed flat. The pan-European FTSEurofirst 300 index <.FTEU3> ended up 0.1 percent, while MSCI's gauge of stocks across the globe <.MIWD00000PUS> fell 0.3 percent.

In Russia - a major oil producer - the dollar-denominated RTS share index <.IRTS> rose 2.3 percent.

Oil stocks and the weaker yen overnight also lifted Tokyo shares, which closed 1.4 percent higher <.N225>. Nikkei futures <NKc1> fell 0.1 percent.

U.S. crude <CLc1> was up 1.4 percent at $47.72 a barrel and Brent <LCOc1> last traded at $49.07, up 0.8 percent on the day.

The safe-haven Japanese yen fell as much as 1.2 percent versus the U.S. dollar, but cut its losses by more than half as stocks sold off late in the U.S. session.

It was last down 0.4 percent at 101.06 per dollar, having fallen as low as 101.84.

U.S. Treasury yields inched lower, with benchmark 10-year notes <US10YT=RR> up 2/32 in price to yield 1.5616 percent, down from 1.567 percent on Wednesday.

However, U.S. yields remain trapped in tight ranges and could resume their recent downtrend given geopolitical tensions and political uncertainty, analysts said.

"I wouldn't get caught up in the short-term moves in the Treasury market," said Mike Materasso, co-chair of Franklin Templeton's fixed income policy committee in New York. "The oscillations of five to 10 basis points are not that significant because if you look at the 10-year chart over the last three months, we're still trading in a narrow range."

Copper <CMCU3> rose 0.5 percent to $4,841 per tonne. Spot gold <XAU=> was off 0.1 percent at $1,320.06 an ounce.

(Additional reporting by Chuck Mikolajczak, Gertrude Chavez-Dreyfuss and Sam Forgione; Editing by Meredith Mazzilli and Dan Grebler)