Talk of a possible merger between Germany's two largest banks has heated up in the past few weeks as both lenders are still struggling to revitalise their performance a decade on from the financial crisis.

But Jan Duscheck, head of German union Verdi's banking division, said he did not assume at the moment that a merger of the two banks would be seriously considered in the foreseeable future.

"The task now is to sharpen the business models in both banks and implement their strategic plans," he said.

Talk of a merger is "complete nonsense", said another person with knowledge of the thinking of a major shareholder, speaking on condition of anonymity.

Klaus Nieding from shareholder lobby group DSW said: "What's the point?"

"Just because two lame people get together doesn't make them marathon winners," he said.

Spokesmen for Deutsche and Commerzbank declined to comment on the merger speculation.

Executives at both banks have said that they want to focus on getting their own houses in order before considering any tie-up between the two.

Finance Minister Olaf Scholz has said the country needs strong banks to promote exports. Some bankers privately regard Scholz's comments as a shift in sentiment and that they hint at a willingness by the government to support the finance industry, including helping to engineer a merger.

Staff at the finance ministry are looking at ways to increase competitiveness of German banks, people with knowledge of the matter said.

This also involves looking at a possible change to tax laws to facilitate mergers by making them less costly, the people said. They also said there were no active measures taking place to force a merger.

The government owns a stake of more than 15 percent in Commerzbank after bailing it out during the financial crisis.

Shares in both banks have lost almost half their value so far this year amid concerns about their profitability.

Shares in both rose sharply on Wednesday after Bloomberg reported Germany was holding high-level talks to facilitate a possible merger.

But by late Thursday in Frankfurt, Deutsche Bank was down 0.3 percent, while Commerzbank was down 1.4 percent.

(Reporting by Tom Sims and Hans Seidenstuecker; editing by Thomas Seythal; editing by David Evans and Jane Merriman)