CVS Health cvs is just about to undertake its biggest expansion in years: the drugstore operator has opened the first of the pharmacies it is taking over from Target tgt .

Last summer, the two companies announced that Target would sell its 1,672 pharmacies to CVS for $1.9 billion, a deal that closed in December. Those CVS “stores-within-a-store,” beginning with a handful of locations in North Carolina on Wednesday, will be rebranded as CVS/pharmacy and MinuteClinic locations. The conversions will take place over a six-to-eight month period, expanding CVS’s pharmacy footprint by 20% with more than 9,000 locations, catapulting it past Walgreens wba . (Walgreens Boots Alliance, meanwhile, is trying to buy the No. 3 U.S. drugstore chain Rite Aid RAD for $9 billion but may have to close thousands of stores to meet regulatory hurdles.) The deal will also give CVS its first pharmacies in major markets like Seattle, Denver, and Portland.

Target—which in 2015 had only $4.2 billion in prescription revenue, according to Pembroke Consulting—was never able to make a go of the business. For one thing, the discount retailer does not have the same clout with drugmakers as CVS (which also operates pharmacy benefits manager giant Caremark), impeding its ability to get the best prices and make a profit. (Some media reports suggested Target at best broke even in its pharmacy business, which is one-fifth the size of Walmart’s wmt .) Target CEO Brian Cornell last year said his company was a “sub-scale player” in the pharmacy industry and that only 5-7% of Target customers use its pharmacy services.

“More and more guests will have access to CVS Health’s leading pharmacy care and clinical programs during their Target shopping experience,” Cornell said in a statement on Wednesday. In an interview with Fortune, Cornell noted that handing off the pharmacy business to CVS would allow Target to focus on its key priorities, which includes improving its offering of health-oriented items, from organic snacks to athletic apparel, leaving CVS to provide services it is better qualified to provide.

The move will help CVS build it pharmacy business, which accounts for 70% of the retailer’s sales. By teaming up with Target, CVS may be missing out on incremental sales of general merchandise items like toothpaste that people pick up when they come to get their prescription. But it seems there is a bigger benefit that overrides that: feeding business to Caremark, which is now a bigger source of revenue than the drugstores for CVS.

Said CVS Health CEO Larry Merlo: “Having CVS/pharmacy in Target stores will expand the network of our pharmacies available to our CVS Caremark plan members.” That, he added, would bring in millions of new customers.