Dollar Tree Inc. agreed to buy Family Dollar Stores Inc. for at enterprise value of $9.2 billion to enlarge the discount retailer’s network to more than 13,000 stores with annual sales exceeding $18 billion.

In a transaction approved by the boards of both companies, Dollar Tree is offering $74.50 a share, a premium of almost 23 percent to Family Dollar’s closing price on July 25, Chesapeake, Virginia-basedDollar Tree said today in a statement. Dollar Tree agreed to pay $59.60 in cash and $14.90 in stock per share for its Matthews, North Carolina-based rival.

“The acquisition of Family Dollar is consistent with our vision to be the leader in value retailing,” Dollar Tree Chief Executive Officer Bob Sasser said in the statement. The equity value of the deal is about $8.5 billion.

Billionaire investor Carl Icahn, who amassed a 9.4 percent stake in Family Dollar, said last month the retailer should put itself up for sale. The transaction is expected to close by early 2015, and to contribute to Dollar Tree’s cash earnings per share within the first year, the buyer said. Dollar Treeestimated it will have $300 million in annual “run-rate synergies” by the end of the third year after the deal is completed.

Family Dollar shares rose 22 percent to $74 in premarket U.S. trading, while Dollar Tree gained 4.4 percent.

The combined company will continue to operate under the Dollar Tree, Deals, Dollar Tree Canada and Family Dollar brands, according to the statement. Howard Levine, CEO of Family Dollar, will remain with the company and report to Sasser.

The sale is the culmination of a strategic review that Family Dollar “began this past winter,” Levine said.Dollar Tree will generate “significant synergies” in areas including procurement and logistics, and will have improved growth prospects, the companies said.

Family Dollar shareholders will own 12.7 percent to 15.1 percent of the outstanding stock of Dollar Tree when the deal is done. Family Dollar shareholders CEO Levine and Trian Fund Management LP, representing about 16 percent of the stock, support the deal, the companies said in a joint statement.

The amount of Dollar Tree shares may be adjusted depending on fluctuations in the stock’s price.

Family Dollar has been the subject of takeover speculation since another activist investor, Nelson Peltz of Trian, made an unsolicited bid in 2011 in an attempt to attract other suitors. Trian owns about 7.3 percent of the company, according to data compiled by Bloomberg.