The merger will create a powerful new force in German retailing, with a turnover of DM28bn ( pounds 11.2bn) and 238 outlets.
The privately owned Hertie, the third-biggest department store in Germany, with a turnover of DM7bn, found it was too small to succeed in a sluggish market.
The owners of Hertie, two foundations and family heirs, are expected to take a stake in Karstadt of between 25 and 30 per cent. This is based mainly on shares from the two banks, both of which are expected to sell 15 per cent of their Karstadt holding, leaving them with 10 per cent each.
Karstadt is mainly active in the industrial Ruhr area as well as in Berlin and Hamburg. Hertie's flagship store is the Kaufhaus des Westens in Berlin. Analysts expect the link-up to bring medium-term cost advantages in buying and logistics, but there will be heavy costs in the short term.
The merger will help Karstadt/ Hertie to compete on better terms with Switzerland's Metro group, which has extensive retail interests in Germany, including the second- biggest department store group, Kaufhof.
The disposal of Karstadt shares by Deutsche Bank and Commerzbank continues the trend of scaling down their widespread holdings in German industry.