Shares in Germany's second biggest bank rose 7% after the better-than-expected performance, which Commerzbank said was largely attributable to net commission income from securities trading, a rebound that has also helped other banks.

Commerzbank posted a net profit of 133 million euros ($161 million) in the three months to March 31, against a loss of 291 million euros a year earlier.

Analysts, who had expected a net loss of 131 million euros for the quarter, still expect Commerzbank to report a loss this year as it carries out a 2 billion euro restructuring involving hundreds of branch closures and 10,000 job cuts.

The bank, which is still partially owned by the state after a bailout during the financial crisis more than a decade ago, now expects full-year revenue to slightly exceed last year's, a shift from previous expectations for a slight decline.

"After a very good start to the year, we are looking confidently to the future despite the ongoing pandemic," Commerzbank Chief Executive Manfred Knof said.

Knof last week struck a deal with employees over the planned job losses, central to efforts to restore profitability at Commerzbank, which has never fully recovered since its bailout and made a 2.9 billion euro loss last year.

Fees from the surge in securities trading are expected to ease in the coming months as markets become less volatile, Commerzbank's finance chief Bettina Orlopp told analysts.

($1 = 0.8247 euros)

(Reporting by Tom Sims and Patricia UhligEditing by Maria Sheahan, David Goodman and Alexander Smith)

By Tom Sims and Patricia Uhlig