Saks Fifth Avenue this afternoon agreed to be bought by Hudson's Bay, a company with retail chains across North America, for $16 a share, or $2.9 billion including debt.

The deal follows a rough few years for the luxury retail chain, which took an especially hard beating during the recession, and has had a rockier recovery than its competitors. The company reported a net income of $63 million for the fiscal year ending in February, a 16 percent drop from the year before. Sales, at $3.15 billion, rose just slightly.

So why is Hudson's Bay spending billions on Saks?

For one, Saks claims 42 name brand stores and 66 outlet stores across the U.S., including its Manhattan flagship store on Fifth Avenue, which alone is worth an estimated $805 million — and Hudson's Bay loves real estate.

The Canadian company's CEO Richard Baker is a New York real estate mogul, part of a group that owns National Realty & Development Corp, a private developer of retail and shopping centers across the U.S.

Baker oversaw the 2011 sale of 220 leases from Hudson's Bay's Zellers chain to Target, which allowed Target to expand into Canada, while earning Hudson's Bay $1.8 billion. The deal was "hailed as a masterstroke," says Reuters.

In addition, Hudson's Bay owns Lord & Taylor, a lower-end department store with room to grow. "Saks still has a number of stores in unprofitable locations," says The Wall Street Journal. "By swapping Saks Fifth Avenue stores in lower-end malls for the more moderately priced Lord & Taylor, Mr. Baker could alleviate Saks's real-estate problems at little cost, a person familiar with his plans said."

Together, Hudson's Bay, Lord & Taylor, and Saks Fifth Avenue will have 320 stores, many in major metropolitan areas over the U.S. and Canada. Baker says he'll consider strategic options for the combined real estate portfolio, which could include starting a real estate investment trust.

But it's not just a real estate deal. Baker plans to to renovate Saks stores and to make the brand "luxurious" again — a branding effort it has struggled with ever since it began offering steep discounts during the recession. He also plans to open seven Saks Fifth Avenues and 25 Off Fifth outlet stores in Canada.

If Saks can get back in the game, the luxury market has plenty to offer Hudson's Bay. "Global luxury sales, including higher-end jewelry and clothes, rose an estimated 10 percent to $281.96 billion last year, according to the latest study from Bain & Co.," says The Washington Post. "In North American, luxury sales were up an estimated 12 percent to $81.33 billion."