CVS Health, the nation’s biggest pharmacy chain, agreed on Sunday to purchase Aetna, the No. 3 health insurance company, in a $69 billion deal that promises to reshape the health care market.

The combined company, in addition to gaining the power to perhaps drive lower prices from pharmaceutical companies, could spark other drug chains, like Walgreens, to look for merger partners.

A CVS Health-Aetna merger would likely create a behemoth with revenue greater than any other US company except Walmart.

The $207 share deal represents a vertical merger — where the two companies don’t compete but work in aligned industries — that until very recently had not posed troubles for regulators.

But President Trump’s Department of Justice last month sued AT&T to stop its proposed $85 billion vertical merger with Time Warner — arguing the deal could lead to higher prices for pay TV.

“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,” CVS said in a statement announcing the deal.

For CVS and other drugstore chains, the vertical was spurred, in part, by the rising power of online rivals to undercut them.

Specifically, Amazon has been moving to acquire state pharmacy licenses as a possible prelude to it entering the retail pharmacy business, experts have said.

It is not known if the DOJ, which typically reviews health insurance deals, or the Federal Trade Commission, which vets drugstore deals, will handle this merger.

It would be better for CVS if it winds up with the FTC, one source said.

For CVS, which owns nearly 10,000 pharmacies plus a leading pharmacy benefits manager, which negotiates prices for drugs, the hope is that it can drive lower prices on prescription drugs.

For Aetna, CVS’ 1,000-plus clinic network can help drive down expenses. The clinics, many located in CVS stores, are less expensive than having people treated in emergency rooms or at doctors’ offices.

Coaxing Aetna customers into CVS stores to pick up prescriptions could also boost sales of front-of-store items.

In markets where Aetna is strong, CVS could push insurers it does not own to charge it lower prices if they want to do business with CVS, the source said.

“There is an over 70 percent chance the CVS deal gets approved by regulators,” the source said, but it is far from a sure thing.

If the deal closes, and if it works, it’s great for society, the source said.

Drugstores and health insurers have been trying to merge in recent months but have failed to win regulatory approval.

Most notably, Aetna chief executive Mark Bertolini’s $34 billion deal to buy Humana came to an end in February when a federal judge ruled the tie-up would likely lead to higher prices for consumers.

CVS will pay $145 a share in cash for Aetna plus $62 in newly issued CVS stock.

There is a chance, of course, that a rival retailer comes in and tops CVS’ offer price.

Regulators could get stuck on CVS forcing Aetna customers to go to their pharmacy to get prescriptions filled — or giving preferential pricing to Aetna.