WASHINGTON (Reuters) - A federal judge reviewing a Justice Department decision to allow U.S. pharmacy chain and benefits manager CVS Health Corp CVS.N to merge with health insurer Aetna said on Wednesday that the agreement was in fact legal under antitrust law.

FILE PHOTO: Logos of CVS and Aetna are displayed on a monitor above the floor of the New York Stock Exchange shortly after the opening bell in New York, U.S., December 5, 2017. REUTERS/Lucas Jackson

Judge Richard Leon of U.S. District Court for the District of Columbia had been examining a government plan announced in October to allow the merger on condition that Aetna sell its Medicare prescription drug plan business to WellCare Health Plans Inc WCG.N. Both deals have already closed.

Leon had initially balked at approving the merger conditions and insisted on hearing from critics of the deal, but finally decided to grant the motion to approve the consent agreement.

But he took aim at the common practice of companies’ closing multibillion-dollar deals while the court review, required by the Tunney Act, was still in process.

“If the Tunney Act is to mean anything,” Leon wrote, “it surely must mean that no court should rubberstamp a consent decree approving the merger of ‘one of the largest companies in the United States’ and ‘the nation’s third largest health-insurance company,’ ... simply because the Government requests it!”

In December, Leon said he was "less convinced" than the government that the asset sale to WellCare would resolve antitrust concerns. Since then, Centene Corp CNC.N agreed to acquire WellCare for $15.27 billion.

Assistant Attorney General Makan Delrahim, head of the Justice Department’s Antitrust Division, said he was pleased with Leon’s decision.

CVS said the judge’s decision reinforced that CVS and Aetna have already merged.

“CVS Health and Aetna have been one company since November 2018, and today’s action by the District Court makes that 100 percent clear. We remain focused on transforming the consumer health care experience in America,” CVS spokesman T.J. Crawford said in an emailed statement.

Critics of the CVS-Aetna deal included the American Medical Association and the AIDS Healthcare Foundation.

Another critic, U.S. PIRG, expressed skepticism that savings from the merger would end up in consumers’ pockets.

“Again and again, CVS Caremark has used its market power to both increase the cost of medications for consumers and rip off the government, instead of passing on savings its promised to consumers,” PIRG said in a statement.

Pending Leon’s approval, CVS agreed to temporarily allow Aetna to independently make critical product, pricing and personnel decisions.

CVS has been in the process of converting itself into a healthcare company and said in June that it would offer expanded health services such as nutrition counseling and blood pressure screenings in 1,500 stores by the end of 2021.

Most consent agreements that the antitrust agencies strike with companies to resolve competitive concerns are approved by federal courts with little fuss under the 1974 Tunney Act, which requires courts to ensure the agreements are in the public interest.

Companies generally do not wait for final court approval before closing their transactions.