FRANKFURT -- Germany's struggling Deutsche Bank said Sunday it would cut 18,000 jobs by 2022, downsizing its volatile investment banking division in a restructuring aimed at restoring consistent profitability and better returns to shareholders.

The Frankfurt-headquartered bank said it would cut roughly a quarter of its total annual costs, from 22.8 billion euros ($25.6 billion) last year to 17 billion euros, through steps such as dropping the investment bank's stock-trading business.

It also plans to slim the division focused on fixed-income investments.

The aim is to focus on areas where the bank is among market leaders, and on businesses with steadier earnings such as serving corporate customers.

For years, Deutsche Bank has wrestled with regulatory penalties and fines, high costs, weak profits and a low share price. The bank went three straight years without turning an annual profit before recording positive earnings of 341 million euros for 2018. CEO Christian Sewing took over last year and promised faster restructuring after predecessor John Cryan was perceived to have moved too slowly.

Deutsche Bank shares rose 2.5 per cent on Friday to 7.18 euros as markets anticipated a restructuring announcement. That is far below levels from mid-2015, when the shares traded over 30 euros per share. Shareholders received a dividend of only 11 cents per share for 2017 and 2018.

The bank said one-time charges from the changes would mean a net loss of 2.8 billion euros in the second quarter. Excluding the charges, net profit would have been about 120 million euros.

The restructuring follows the failure in April of merger talks with German rival Commerzbank. Deutsche Bank said the combination would not make business sense, but that left open the question of what strategy the bank could pursue to make its business leaner and more profitable.

As part of the restructuring the bank said it would create a separate unit to dispose of billions in investments that are less profitable or no longer fit its strategy. The bank said it did not expect to have to raise additional capital from shareholders.

When complete, the job cuts are to reduce the workforce to 74,000. The bank would not say where the cuts would fall; many of its investment banking activities are carried out in New York and London.

The bank paid billions in fines and settlements related to behaviour before and after the global financial crisis, including a $7.2 billion settlement in 2017 with the Justice Department over selling bonds based on mortgages to people with shaky credit. But that hasn't ended the negative headlines. Two congressional committees have subpoenaed Deutsche Bank documents as part their investigations into President Donald Trump and his company. Deutsche Bank was one of the few banks willing to lend to Trump after a series of corporate bankruptcies and defaults starting in the early 1990s.

Trump had sued Deutsche Bank to stop the subpoenas, but a judge in May ruled against the president.