NEW YORK — Canadian food and drugstore operator Loblaw Cos. is buying Shoppers Drug Mart in a cash-and-stock deal valued at about 12.4 billion Canadian dollars ($12 billion).

The deal would give Loblaw access to the growing small-urban store segment, help it remain competitive and give customers more choices and locations to shop.

Shoppers Drug Mart shareholders will own about 29 percent of the combined company under the deal. Shoppers Drug Mart will be a separate unit of Loblaw and will continue to be led by President and CEO Domenic Pilla.

Loblaw will pay 33.18 Canadian dollars in cash and 0.5965 of its shares for each share of Shoppers Drug Mart Corp. This comes to 61.54 Canadian dollars per Shoppers Drug Mart share.

Shoppers Drug Mart stockholders can choose 61.54 Canadian dollars in cash or 1.29417 Loblaw common shares plus a penny in cash for each share they own.

The maximum amount of cash to be paid by Loblaw will be about 6.7 billion Canadian dollars and the maximum number of Loblaw shares to be issued will be approximately 119.9 million.

Annual cost savings are expected to total 300 million Canadian dollars by the third year after the transaction's closing.

The deal is expected to close in six to seven months. It still needs the approval of at least 66 2/3 percent of the votes from shareholders of Shoppers Drug Mart. A special stockholders meeting is expected to take place in September.

The buyout also needs the approval of a majority vote of Loblaw shares. Since George Weston Ltd. — which owns about 63 percent of Loblaw's stock — is supporting the deal, Loblaw believes this is evidence of shareholder approval and that it won't have to hold a stockholders meeting.