(Reuters) - CVS Health Corp CVS.N reported higher-than-expected third-quarter profit on Wednesday as medical costs in its Aetna health insurance business came in below forecasts, and the company said its new strategy of using in-pharmacy clinics would contain healthcare spending going forward.

FILE PHOTO: People walk by a CVS Pharmacy store in the Manhattan borough of New York City, New York, U.S., November 30, 2017. REUTERS/Shannon Stapleton

Shares of CVS, which runs a national drugstore chain, rose more than 5%, as its pharmacy benefits business also posted better-than-expected operating profit.

CVS completed its purchase of Aetna last year, combining one of the largest U.S. pharmacy benefit managers with one of the nation’s oldest health insurers. The deal was driven in part by CVS’ strategy to cut health plan costs through its “HealthHUB” pharmacies.

These hubs include expanded CVS MinuteClinics staffed with nurse practitioners, while pharmacists have larger roles such as advising patients on health needs like blood glucose measurements for customers with diabetes.

“We believe if we can engage consumers around their health, we will improve health outcomes and ultimately that will reduce healthcare costs,” Chief Executive Larry Merlo said in a phone interview.

CVS expects to lower costs as hubs handle services typically done in pricier settings, he said, such as emergency rooms or hospital-affiliated urgent care centers.

The hubs are already driving prescription growth and retail store sales, Merlo said. The company also has two insurer customers whose members are using the CVS hubs in a pilot program.

CVS plans to open 1,500 HealthHUBs around the country by the end of 2021, and said they will contribute to earnings in 2021. Merlo expects to provide more financial details around the second quarter of next year.

Sales in the pharmacy benefits management (PBM) business, which negotiates discounts with drugmakers for its clients that include insurers, rose 6.4% to $36.02 billion, helped by increased pharmacy claims and a higher prices for branded drugs.

The unit that includes Aetna posted sales of $17.18 billion, helped by lower-than-expected medical costs.

Results from CVS’ retail business were pressured by lower payments for filling prescriptions, an industry-wide trend. Sales still rose 2.9% to $21.47 billion.

CVS plans to close about 75 retail pharmacy stores in 2020, Chief Financial Officer Eva Boratto said on a conference call with analysts.

Excluding items, CVS earned $1.84 per share, topping analysts’ average estimate by 7 cents, and it raised its full-year earnings forecast.

CVS now expects 2019 adjusted profit of $6.97 to $7.05 per share, up from a prior forecast of $6.89 to $7.00.

CVS revenue reported for the quarter jumped 36.5% to $64.81 billion, beating Wall Street expectations of $63 billion.