The pharmacy chain CVS Health has agreed to buy Aetna in a $69 billion deal that could transform the health care industry. If the deal, which was announced by the two companies on Sunday, is approved by regulators, it would bring a large health insurance company and pharmacy provider under one umbrella.

The agreement is expected to close in the second half of 2018. The terms of the merger agreement were approved by the board of directors of both companies on Sunday.

“This transaction fills an unmet need in the current health care system and presents a unique opportunity to redefine access to high-quality care in lower cost, local settings whether in the community, at home, or through digital tools,” the two companies said in a joint announcement.

In the statement, the companies said they will become a trusted community partner who will help consumers better manage the cost of the health care they need.

As part of the deal, CVS plans to use its pharmacy locations to provide consumers with “community health-hubs” where patients can get answers to questions about their health, prescription drugs and health coverage. Pharmacy locations will also includes space for wellness, clinical and pharmacy services, vision, hearing, nutrition, beauty, and medical equipment.

The two companies touted the merger as a better opportunity to utilize local care solutions by connecting Aetna with greater consumer access through CVS’ 9,700 pharmacies and 1,100 MinuteClinic walk-in clinics. By connecting patients with community health-hubs, the companies say it will help them reduce hospital readmission costs as patients can stop at these local facilities to assess their needs.

Several news reports on the deal note that a big driving factor in the acquisition is potential competition from Amazon as it seeks to enter the pharmacy market. Corporations from all industries are dealing with the threat of Amazon and most recently the e-commerce giant entered the grocery business with its acquisition of Whole Foods.