Longtime drugstore sector watchers can relax now. Department store retailer J.C. Penney (NYSE:JCP) today announced the unthinkable, finally confirming the sale of its Eckerd drugstore operation to CVS (NYSE:CVS) and Canadian operator Jean Coutu.

The deal is expected to net J.C. Penney some $3.5 billion in cash after deal-related expenses. CVS will take home 1,260 Southeastern Eckerd stores (and three distribution centers, plus Eckerd's order and pharmacy benefits management businesses) principally located in Florida and Texas and pay $2.15 billion in cash to do so. Jean Coutu will get Eckerd's mid-Atlantic and Northeastern stores and support facilities. The deal is expected to close in June, with the splitting of Eckerd meant to help the transaction get regulatory approval.

It certainly seems unlikely that it would be shot down on competitive grounds. While Jean Coutu is perhaps unfamiliar to many American investors because its shares aren't traded on a U.S. exchange, the deal nevertheless provides the company with a total of nearly 2,200 stores in North America and adds another major player to the market. Jean Coutu plans to keep the Eckerd name rather than re-brand the new stores to fit with its New England-based Brooks Pharmacy chain.

The equity analyst calculators are surely buzzing as we speak. CVS expects to see its earnings diluted in the near term, but also says the combined company would have sported $33 billion in revenue, up significantly from its reported $26.58 billion and just ahead of key competitor Walgreen's (NYSE:WAG) $32.5 billion for the fiscal year ended Aug. 31.

J.C. Penney, meanwhile, now figures to have a substantial pile of new cash at its disposal. With the company recently showing signs of life amid stiff competition from Wal-Mart (NYSE:WMT), SearsRoebuck (NYSE:S), and others, the new money should give the company much-appreciated flexibility. Both CVS and J.C. Penney shares rose in morning trading today, indicating investors' support for the deal from multiple angles.

Tom Gardner's goal with Motley Fool Hidden Gems is to uncover small, undervalued companies. Check it out, free, for 30 days.

Fool contributor Dave Marino-Nachison doesn't own any of the companies in this story.