Hudson's Bay and Signa have agreed to merge Germany's two major department store chains, Galeria Kaufhof and Karstadt as they seek to respond to fierce competition from e-commerce players.

Occupying prime locations in many major German cities, Kaufhof and Karstadt have fallen on hard times in the last decade, fueling speculation that the rival chains would be forced to combine. Kaufhof runs 96 stores and Karstadt has 80.

The deal will unite retail operations with annual sales of around 5.4 billion euros ($6.3 billion). The combination will be 49.99 percent owned by Canadian retail giant Hudson's Bay, while Austrian Karstadt owner Signa will hold the remainder.

The agreement also includes the sale of stakes in HBC's European real estate assets to Signa and will result in net proceeds of 411 million euros for HBC.

"This partnership is a smart, strategically sound opportunity to equip both companies with the capabilities to strengthen operations and overcome the challenges in the German retail market," HBC Chief Executive Helena Foulkes said in the statement. Signa will manage the day-to-day operations of the combined business, with Karstadt Chief Executive Stephan Fanderl leading the new retail company.