Rite Aid Corp., the No. 3 U.S. drugstore chain, Thursday said it will buy the Brooks and Eckerd drugstore chains from Canada's Jean Coutu Group (PJC) Inc. for about $2.6 billion in cash and stock.

The purchase will give Rite Aid (RAD) about 5,000 stores, making it a closer rival to Walgreen Co. (WAG) and CVS Corp. (CVS), the largest U.S. drugstore chains.

Rite Aid will add 1,521 Eckerd and 337 Brooks stores to its existing lineup of 3,319 stores and expand into four new states: Massachusetts, Rhode Island, South Carolina and North Carolina. The stores will all operate under the Rite Aid name.

Terms of the transaction call for Coutu to receive $1.45 billion in cash, plus 250 million shares of Rite Aid common stock worth about $1.18 billion as of Wednesday's close. Rite Aid will also assume $850 million of Coutu debt. The deal gives Coutu a 32 percent equity stake in Rite Aid.

Jean Coutu will remain an independent franchiser and distributor in Canada, where it has 327 franchised stores.

Rite Aid President and Chief Executive Mary Sammons will continue to lead the company and add the role of chairman. Michel Coutu, the president of Jean Coutu's U.S. operations, will become co-chairman.

Rite Aid, which will remain based in Camp Hill, Pennsylvania, said it expects the acquisition to cut earnings 3 cents to 7 cents per share in the first year, due to integration and other expenses, and then add 9 cents to 15 cents to earnings per share 12 months after the close.

Rite Aid said the deal was approved by the boards of both companies and that closing might take place in a few months.