(Reuters) - The largest U.S. health insurer UnitedHealth Group Inc will buy DaVita Inc’s primary and urgent care services for $4.9 billion in its second acquisition this year to expand its fast-growing medical group, it said on Wednesday.

Health insurers are trying to cut medical costs by playing a more direct role in medical services, arguing they can save money by shifting patients to cheaper, more accessible locations for routine or non life-threatening emergency medical services.

On Sunday, No. 3 health insurer Aetna Inc agreed to be bought by CVS Health as part of a drive to expand medical services at CVS pharmacies to include more preventative screenings such as for vision and hearing.

Denver-based DaVita operates medical groups in six states that serve 1.7 million patients through about 300 clinics, adding to UnitedHealth’s 250 MedExpress urgent care centers and its 200 surgical centers that are part of recently acquired Surgical Care Affiliates.

Shares in DaVita rose 13.6 percent, a more than $193 million gain for billionaire investor Warren Buffett, who owns a 20 percent stake in the dialysis and medical group company.

Reuters reported last month that DaVita was exploring a sale of its medical unit. DaVita’s kidney dialysis unit is not included in the deal.

Leerink analyst Ana Gupte said the purchase is likely to add to UnitedHealth earnings per share by 1 percent to 4 percent in 2018 and 5 percent to 7 percent in 2019, the first full year after the deal closes.

EvercoreISI analyst Michael Newshal said he thought near-term earnings additions would be close to neutral given the price that UnitedHealth was paying was on the high side.

UnitedHealth did not provide any details on the financial impact of the purchase. Its shares gained less than 1 percent to $220.48 on Wednesday, lifting its market capitalization to more than $212 billion.

UnitedHealth bought Surgical Care Affiliates for about $2.3 billion in March.

The DaVita acquisition will add 2,200 physicians, nurse practitioners and physicians’ assistants and 15,000 other affiliated providers who serve its patients to UnitedHealth’s Optum unit, which has more than 30,000 physicians who work for or are affiliated with its practices.

Optum includes MedExpress urgent care centers, surgical centers from its $2.3 billion March acquisition of Surgical Care Affiliates, pharmacy benefit management and data services as well as a bank.

DaVita will continue to operate DaVita kidney care, which owns or helps manage 2,470 outpatient dialysis centers in the United States.

DaVita’s medical group had $4.11 billion in sales last year, or 30 percent of the total. It had become a major drag on the company’s financial performance in recent quarters as it struggled with low payments from the government’s Medicare Advantage program.

DaVita plans to use proceeds from the sale for stock buybacks and to repay debt.