FRANKFURT (Reuters) -Deutsche Bank nearly tripled its fourth-quarter profit, defying expectations for a loss, as revenues at the investment bank rose.

The net profit attributable to shareholders was 145 million euros ($162.62 million) in the three months ending Dec. 31, figures published on Thursday showed. That compares with a profit of 51 million euros a year earlier, and it is better than analyst expectations for a loss of around 130 million euros.

It was the sixth consecutive quarter of profit, the bank’s longest streak in the black since 2012, and a milestone for CEO Christian Sewing, who was promoted to chief executive in 2018 to turn Deutsche around after a series of embarrassing and costly regulatory failings, including over money laundering.

For the full year, Deutsche posted annual profit of 1.94 billion euros, its second consecutive year in the black, and up sharply from 113 million euros a year ago.

“Our transformation progress and financial performance in 2021 provide a strong step-off point to achieve our target of a return on tangible equity of 8% in 2022,” Sewing said, confirming a key profit target.

($1 = 0.8917 euros)

(Reporting by Tom Sims and Frank Siebelt, editing by Kirsti Knolle)