Drugstore operator Rite Aid Corp. agreed to buy pharmacy benefit manager EnvisionRx for about $2 billion, looking to cut drug procurement costs as reimbursement rates fall.

The third-largest U.S. drug-store operator’s shares jumped as much as 12 percent Wednesday in heavy trading.

Pharmacy benefit managers administer drug benefits for employers and health plans and run large mail-order pharmacies, helping them get better prices from drugmakers.

“The synergy between our companies are going to be driven, we hope, by revenue growth primarily,” Rite Aid’s Chief Executive John Standley told Reuters. “We will be more efficient on the drug purchasing side and on the rebating side.”

Rite Aid’s deal comes nearly a decade after larger rival CVS Health Corp bought Caremark Rx for $21 billion, the only other example of a drug chain buying a benefits manager.

However, Rite Aid has a long way to go before it challenges CVS/Caremark. Even after the deal, RiteAid’s revenue will be about a quarter of that of CVS/Caremark.

“CVS obviously does have more scale in the market than we do. We have many strategic relationships with other pharmacy benefit managers,” Standley said.

The acquisition could raise EBITDA 5-7 percent by enhancing Rite Aid’s suite of health care services, Guggenheim Securities analyst John Heinbockel wrote in a note.

Rite Aid said it expected the deal to add to profit in the first full year following close, expected in September.

Two analysts called the deal a “strategic positive” for Rite Aid, saying it would give the company broader access to specialty pharmaceutical business.

Specialty pharmacy provides personal medication management services to patients with complex and unique medication needs and typically cost more.

Pharmacy benefit managers have been striking deals with drugmakers to get discounts by offering exclusive distribution.

The profit margins are slim on prescription drugs, particularly generics, and reimbursement rates are low.

EnvisionRx manages pharmacy benefits for more than 13 million individuals. The privately held company is a unit of Envision Pharmaceutical Holdings LLC, which is owned by private equity firm TPG.

Rite Aid said it would pay about $1.8 billion in cash and $200 million in stock for EnvisionRx.

About 12 million Rite Aid shares were traded by 2 p.m. ET, nearly four times their 10-day average volume. The stock was up 7.3 percent at $8.13 after touching an eight-month low of $8.48 on the New York Stock Exchange.