Deutsche Bank delivered record investment bank earnings and European peers Lloyds and Swedbank swung to surprise profits on Tuesday as an economic recovery picked up to aid the embattled industry.

Deutsche Bank , Germany's biggest lender, easily beat analyst forecasts with a 2.8-billion-euro ($3.7 billion) profit that came almost entirely from its corporate banking and securities division, mirroring blowout gains by Goldman Sachs and Morgan Stanley .

The first impression is really good. Deutsche Bank is above consensus both before and after taxes. In addition, the loan loss provisions fell significantly, which is a very good sign, said Merck Finck analyst Konrad Becker.

Lloyds Banking Group , Britain's largest retail bank, returned to the black in the quarter and expects to deliver a profit in 2010 as losses on bad debts fall.

The recovery was quicker than expected for the bailed-out lender, and improved the chances the government will start selling down its 41-percent stake.

Shares in Lloyds are now trading above the average price at which the government bought its shares, raising the prospect of a sale after a UK election on May 6.

This (return to profit) is far earlier than expected, said Andrew Lim, analyst at Matrix in London. Consensus was pointing to a return to profitability for full year 2010, with second-half profits more than offsetting losses in the first half. This will be taken as very good news indeed.

By 5:30 a.m. ET Lloyds shares were up 2.1 percent at 71.2 pence, but Deutsche Bank stock slipped 1.5 percent.

Analysts and dealers blamed Deutsche's drop on its comments that the strong first quarter may not last and a fall in its capital ratios, worrying at a time that banks are being told to hold bigger cushions to limit damage from future crises.

Deutsche also said it faces a U.S. class-action lawsuit over mortgage-related securities it helped arrange. But it tried to distance itself from fraud charges against rival Goldman Sachs and fears that more Wall Street firms could be targeted by saying it had not been informed of any imminent charges.

Sweden's Swedbank also swung to a surprise first-quarter operating profit, its first in more than a year, after credit losses came in lower than expected. Its shares rose 2.1 percent.

Like Lloyds, Swedbank is emerging from a difficult year. It spent 2009 in the red due to a deep recession in the Baltic states, but said it was more confident of improved profits provided there were no big deviations in the global economy.

BAR RAISED

Deutsche, Lloyds and Swedbank were underpinned by improving bad debts. That trend began last year and appears to be accelerating, analysts said.

Lloyds said losses on commercial real estate in Ireland remain a problem but overall impairments had slowed significantly.

The improvement has coincided with continued strength in capital markets earnings, and Deutsche Bank joined U.S. rivals in showing robust revenues from fixed income, commodities and currencies.

The performance boosts the chances of 62-year-old Swiss Chief Executive Josef Ackermann hitting ambitious profit targets of 10 billion euros in pretax profit by 2011.

But strong results from the likes of JP Morgan , Goldman Sachs and Citi have raised the bar for European rivals who report later.

Credit Suisse posted in-line profits last week, but was punished by investors for lagging U.S. rivals. Barclays , UBS and most other banks report in the next two weeks.

Also on Tuesday, Spain's Popular reported a 9- percent drop in net profit from a year ago, but ahead of analysts forecasts, aided by lower provisions.

(Additional reporting by Steve Slater in London, Mia Shanley in Stockholm and Judith MacInnes in Madrid, Editing by Sitaraman Shankar)