Deutsche Bank is firmly back in the red.

Germany's biggest bank posted a net loss of €1.9 billion ($2.1 billion) for the fourth quarter of last year, hit by charges that included its costly settlement with the U.S. government over toxic mortgage assets.

Shares in the bank dropped by nearly 6% in early trade.

Deutsche Bank (DB) endured a difficult 2016. Its share price plunged to its lowest level in more than 20 years because of fears over whether the bank had the funds to cover its mounting legal costs.

The lender had managed to generate small profits for the first three quarters of 2016, but the heavy charges it booked in the last three months dragged it down to a full-year loss of €1.4 billion ($1.5 billion).

That's still less ugly than the €6.8 billion ($7.3 billion) loss it suffered in 2015.

Related: Deutsche Bank fined for $10 billion Russian money-laundering scheme

CEO John Cryan said last year's results were "heavily impacted by decisive management action taken to improve and modernize the bank, as well as by market turbulence."

The bank's revenues fell 10% last year to €30 billion ($32.4 billion), which it blamed on several issues including "a challenging market environment" and pressures on its businesses.