Bargain retailer Dollar Tree Inc. is buying rival Family Dollar Stores Inc. for $8.5 billion in cash and stock in a bid to create one of the largest discount retailers in North America, the companies announced Monday.

Chesapeake, Virginia-based Dollar Tree has agreed to pay $74.50 per share for Family Dollar Stores, based in Matthews, N.C., a premium of 22.8 percent over the closing price on Friday. The boards of directors of both companies unanimously approved the deal, which is expected to close in early 2015.