The CVS Health logo appears above a trading post on the floor of the New York Stock Exchange.

Aetna has reached an agreement to sell its Medicare Part D drug plan business to WellCare Health Plans.

The firms did not disclose the financial terms of the deal but said the transaction is contingent on regulatory approval from the Trump administration for CVS Health's $69 billion acquisition of Aetna.

The business being sold had about 2.2 million members as of June 30, Aetna said in a filing with the Securities and Exchange Commission. It said the sale doesn't affect Aetna's individual or group Medicare Advantage, Medicare Advantage Part D or Medicare Supplement products or plans.

The divestiture could help CVS and Aetna clear a major hurdle for approval from the Department of Justice, but it's no guarantee. Two years ago, the DOJ blocked Aetna's proposed $37 billion acquisition of Humana despite an offer from the firms to divest part of their overlapping Medicare Advantage businesses covering nearly 300,000 people in a sale to Molina Health. Regulators said the merger would be anti-competitive.

In a separate SEC filing, CVS Health said it believes the divestiture represents "a significant step toward completing the DOJ's review of their proposed acquisition."

CVS said the companies are continuing "productive" talks with the Justice Department, and expect the deal to close in the early part of the fourth quarter. It also reiterated that it expects the deal to add to its earnings in the second full year after its close and to deliver more than $750 million in cost savings in the second year.

For WellCare, the transaction would mark its third deal in just over two years, after buying Universal American in 2017 and completing its acquisition of Meridian Health earlier this month. The insurer has a well-established Medicaid business, serving nearly 3 million people in the government safety net health plan, but it has been increasingly focused on growing its membership in Medicare plans for seniors.

The new transaction would triple WellCare's Medicare membership Medicare Drug Plans from 1.1 million to 3.3 million.

Under the agreement, WellCare would assume control of the Aetna plans effective at midnight on Dec. 31 if the CVS-Aetna deal is approved. Aetna would continue to provide administrative services on the contract through 2019.

Hurdles remain. New York's top insurance regulator has raised objections to the CVS-Aetna merger that go beyond concerns about market concentration in Medicare Part D. The objections were made in comments to Connecticut regulators where a hearing on the deal is scheduled for Oct. 4.

"We are concerned with the considerable amount of debt — over $40 billion — that CVS is taking on to finance this transaction," wrote Maria Vullo, the superintendent of New York State's Department of Financial Services. "The considerable pressure to repay debt would cause the resulting company to repay its substantial obligation before investing in pro-market and pro-consumer measures."

The New York regulator also raised concerns that the vertical integration of CVS' pharmacy benefits business with Aetna's insurance plan would put smaller insurers at a disadvantage in the pharmacy benefits manager market. But federal antitrust regulators are not as worried about competition among PBMs. Earlier this month, the DOJ approved Cigna's $54 billion acquisition of pharmacy benefit firm Express Scripts, without concessions.

PBMs, including CVS Caremark, control which drugs are covered and negotiate discounts, known as rebates, on branded drugs with manufacturers. Rebates can help manufacturers secure access on the drug formularies offered by insurance companies.

Assistant U.S. Attorney General Makan Delrahim said he did not believe that the merger would negatively impact the PBM market and that the deal was "unlikely to result in harm to competition or consumers."

CVS' deal involves far more moving parts, with the company's aim of leveraging its retail pharmacies and in-store clinics to provide more integrated care.

In response to superintendent's Vullo's letter, CVS told CNBC earlier this week that the company is committed proving that it will work to reduce costs for consumers.

"We believe that competition within each of the business segments in which we operate — pharmacy benefit management, pharmacies and insurers — is fierce and will remain so. We look forward to further discussions with DFS to demonstrate how the combination of our two companies will benefit consumers," said CVS spokeswoman Carolyn Castel.

Correction: An earlier version of this story incorrectly stated that CVS Health was selling assets.

WATCH: This is what Medicare does and doesn't cover