Target Corp. suddenly has some extra money to spend — and it plans to spend it on bolstering its digital capabilities and reinventing its food business.

The Minneapolis-based retailer revealed early Monday that CVS Health will pay $1.9 billion to acquire and operate 1,660 pharmacies and clinics in Target stores across 47 states, which will give it extra funds to buy back shares as well as result in cost savings that will enable the company to improve operations. The news sent Target’s shares up 1.2 percent in midday trading to $80.45 on the New York Stock Exchange.

CVS Health will operate the pharmacies through a store-within-a-store format branded as CVS Pharmacy. With the pharmacies off its plate, Target will be able to “work faster to innovate and change the way we do business,” the firm’s chairman and chief executive officer Brian Cornell said during a conference call with Wall Street analysts. “Our ability to operate [the pharmacies] is constrained due to lack of scale and expertise.”

Target has been defining the roles of its signature categories, including style, home, baby and kids, and wellness. “It’s the early days of our work, but sales in our key categories grew much faster than total sales growth in last six months,” the ceo said.

“This will accelerate our reinvention of food,” Cornell said of the category, which has been struggling.

New Target stores that offer pharmacy services will have a CVS Pharmacy, the retailer said. In addition, Target’s nearly 80 clinics will be rebranded as MinuteClinics. CVS Health will open 20 new clinics in Target stores within three years of the close of the transaction. The new clinics will be part of CVS/MinuteClinic’s plan to operate 1,500 clinics by 2017.

The two companies plan to develop five to 10 small, flexible Target Express stores over two years following the close of the deal, with CVS pharmacies in each. “[CVS Health] will help us penetrate these growing urban centers,” Cornell said.

While Target’s chief financial officer John Mulligan said the transaction will reduce the top line by $4 billion — the pharmacy’s annual revenues — Target will benefit from reduced costs and will receive payments from CVS Health for occupancy costs of $20 million to $25 million annually.

After taxes and setting aside $200 million for liabilities, Target’s net proceeds will be $1.2 billion, which will be used for repurchasing shares. “We expect the deal to contribute half a point or more over time to earnings per share,” Mulligan said.

“There’s a lot of places we want to invest accretion from the deal or proceeds of the cost savings,” Cornell said. “We’ll continue to invest in building our on-demand capabilities. We want to invest in localization and personalization, and we’ll invest in City Target and Target Express. This allows us to focus in on those strategies.

“Growing together is what we’re most excited about,” Cornell added. “[CVS Health] will be part of the expansion of Target Express. We’ll look at more ways to build out the partnership. We’ll look for more strategic opportunities for the partnership to benefit Target guests.”

Larry Merlo, CVS Health president and ceo, said the two companies have a “highly complementary customer base, brand and culture. This relationship with Target will provide expanded options and access to our unique health care services that lead to better health outcomes and lower overall health costs.”

The deal “boosts Target’s credibility as a destination for health and wellness,” said Joseph Feldman, an analyst at Telsey Advisory Group. The robust CVS Health offering, combined with Target’s ability to enhance its grocery operations, should strengthen wellness, which is one of Target’s signature categories. CVS Health has committed to having a low-cost generic drug program available to Target’s cash-paying customers.

“There’s an emerging strategy of outsourcing selective areas where others can better maximize category performance,” said Craig Johnson, president of Customer Growth Partners. “Unlike normal mass merchant practice, here a partial competitor, rather than a vendor, becomes the “category captain.”

“Having a dedicated operator such as CVS to run and potentially expand this business will be a benefit, and the net proceeds will add to Target’s healthy cash balance as the company begins to recharge its share repurchases,” said Moody’s vice president Charlie O’Shea.

Moody’s affirmed CVS Health’s Baa1 rating.