Merger talks between Germany's top banks, Deutsche Bank and Commerzbank have failed.

The banks said on Thursday that they did not see a viable deal emerging and the benefits were not matching the costs and risks also existed on the execution front.

Speculation on the merger had been rife for months. Olaf German Finance Minister Olaf Scholz has been a vocal proponent of creating stronger banks for Germany.

Citing the need for extra capital, and restructuring costs, the banks said they are calling off the merger talks as the deal-making would be risky.

Sustainable returns needed

“It made sense to evaluate this option for domestic consolidation in Germany. However, we were always clear: We needed to be convinced that any potential combination would generate higher and more sustainable returns,” said Christian Sewing, chief executive officer of Deutsche Bank.

The German government holds a 15.5 percent stake in Commerzbank after it supported the bank with a bailout assistance during the financial crisis.

The German government was supportive of the merger. But the deal faced resistance from trade unions also who said more than 10,000 jobs would be axed.

In the event of a merger, the combined entity would have controlled one-fifth of Germany's High Street banking business with assets in loans and investments amounting to €1.8 trillion or $2 trillion.

In his reaction, Commerzbank CEO Martin Zielke said it made sense to consider the deal. But just like Deutsche Bank, his bank also reflected on the potential benefits and found they were not matching the extra costs and risks ahead.

Deutsche Bank's management updated that it “will continue to review all alternatives to improve long-term profitability and shareholder returns.”

Shares of Deutsche Bank jumped more than 2 percent on the news, while Commerzbank's stock fell nearly 3 percent.

Struggle for growth

Both banks had been struggling to get back to profits after the global financial crisis of 2008 and the sovereign debt crisis of eurozone in 2011.

Deutsche Bank was aiming to generate growth after facing losses at its U.S. investment banking operations. Commerzbank is also finding limited growth avenues.

Analysts at investment bank Keefe, Bruyette & Woods said Deutsche Bank is battling a poor economic environment, rising costs, and disillusioned clients.

GettyImages-Deutsche Bank merger
This combination of file pictures taken in Frankfurt am Main, western Germany, and created on January 17, 2019 shows (L) the logo of German bank Commerzbank at the company's headquarters on April 28, 2015 and the logo of German company Deutsche Bank at its headquarters on February 2, 2018. On April 25, the banks announced failure of the merger deal talks. DANIEL ROLAND/AFP/Getty Images

In recent months Deutsche Bank faced a lot of negative press related to settlements with the U.S. Department of Justice, weak earnings, restructuring and falling stock price.

Some reports also said the Federal Reserve is probing Deutsche Bank’s role in a money-laundering scandal involving Danske Bank.

New suitors eyeing Commerzbank

Meanwhile, the cancellation announcement also coincided with media reports that ING and UniCredit are looking to acquire Commerzbank.

Also, UBS, a leading Swiss bank is eyeing to take over Deutsche Bank’s asset management arm named DWS.

“DWS and asset management is a core part of Deutsche Bank's strategy ... we would expect it would be unchanged,” reacted James von Moltke, the chief financial officer of Deutsche Bank, rebuffing such reports.