VillageMD, a primary-care provider controlled by Walgreens Boots Alliance Inc., has agreed to acquire the parent of CityMD, the urgent-care center chain. 

Walgreens said it will invest $3.5 billion to support the acquisition, according to a statement. Walgreens will remain the biggest shareholder of VillageMD with a 53 percent stake after the deal closes. The transaction is valued at approximately $8.9 billion including investments from Evernorth, a subsidiary of Cigna Corp. The deal confirms a Bloomberg News report that the Walgreens-backed company was exploring a combination with Summit Health-CityMD.

The purchase comes as pharmacy and retail chains Walgreens, Walmart Inc. and CVS Health Corp. are increasingly positioning themselves as entry points to the health-care system. Investors can expect more consolidation as big consumer companies look to play a bigger role in looking after the health of their customers, said Neil Saunders, an analyst at research firm GlobalData.

Under CEO Roz Brewer, Walgreens has added primary-care centers to its U.S. retail locations, partnered with health insurers and bought out its remaining stakes in CareCentrix and Shields Health Solutions. In October, it appointed John Driscoll, CareCentrix’s CEO, as president of Walgreens’s U.S. health-care unit. That follows moves by health-care companies to combine insurance, care delivery and pharmacy assets into vertically integrated entities.

Walgreens last year agreed to more than double its stake in VillageMD to 63 percent from 30 percent by investing $5.2 billion. It first invested in the company in 2020 with a goal of building as many as 700 primary care clinics inside its pharmacies.

Summit Health, formed in 2019 by the merger of Summit Medical Group and CityMD, has more than 370 locations in New Jersey, New York, Connecticut, Pennsylvania and Oregon, according to its website.

Warburg Pincus, a New York-based private equity firm, acquired CityMD in 2017 and took a majority stake in Summit after the 2019 merger, according to a statement at the time.

“Summit Health-CityMD joining VillageMD is transformational for our US Healthcare segment and reinforces our intent to create greater access to quality health care across the care continuum,” Brewer said in a statement. “This transaction accelerates growth opportunities through a strong market footprint and wide network of providers and patients across primary, specialty and urgent care,” she added.