Alexander Pohl/NurPhoto via Getty

Shares of Deutsche Bank (DB - Get Report) registered gains on Monday after the bank agreed to hold tentative talks with Commerzbank (CRZBY) to explore "strategic options."

Deutsche Bank CEO Christian Sewing on the weekend agreed to hold tentative talks with local rival Commerzbank after the German government expressed concerns about lagging performance and the possibility of a foreign takeover of Commerzbank.

Shares of Deutsche Bank were up more than 5%, or 47 cents, at $9.12 in late morning trading on the New York Stock Exchange. Shares of Commerzbank, meanwhile, were up 6.4%, or €43 cents, to €7.08 in Frankfurt.

Deutsche Bank has struggled to generate sustainable profits since the 2008 financial crisis and has paid billions of euros in penalties and fines.

Those in favor of a merger said a tie-up would create a bank with an equity market value of more than €24 billion (US$27 billion), based on Friday's closing share prices, and a 20% share of the German retail banking market.

New York-based Cerberus, a $35 billion private-equity group that is one of the biggest shareholders in both Deutsche Bank and Commerzbank, is reportedly keen on a merger.

A combined firm would create Europe's second-biggest bank behind HSBC (HSBC) and fend off unwanted potential bidders such as French giant BNP Paribas.