Federal regulators are scrambling to complete their review of the $9.4 billion Walgreens-Rite Aid merger before President-elect Donald Trump is sworn in on Jan. 20, The Post has learned.

The Federal Trade Commission is expected to approve the deal in the waning days of the Obama administration, a source close to the case said on Tuesday.

“It’s very clear to everyone that [soon-to-be interim FTC Commissioner] Maureen Ohlhausen is not going to block a deal,” the source noted.

The move to approve the merger of the No. 2 and No. 3 US pharmacy chains — which, when combined, will leapfrog CVS Health, the current No. 1 — would mark a 180-degree turnaround for the normally merger-averse regulator.

Edith Ramirez’ FTC successfully stopped Staples from buying Office Depot, and Sysco from acquiring US Foods.

The Trump administration is expected to ask Ramirez not just to resign her chairwoman’s post, but to leave the FTC entirely, sources said.

That would leave just two commissioners — one Democrat and one Republican — on a five-person governing body.

Until more commissioners are appointed, it will be very hard to get both Ohlhausen and Terrell McSweeny to block a merger, meaning deals will just get approved when merger timing agreements expire, the source said.

The FTC staff is expected to recommend to the three-person leadership by early next week that the deal be approved.

The deal includes the sale of 865 Rite Aid stores to Fred’s Inc., a small Southeast drugstore chain, to avoid antitrust concerns.

At the same time, the FTC will likely ask Fred’s — which will more than double in size after it buys the Rite Aid stores — to raise additional equity to help stabilize its financing after closing, a source said.

Ramirez has managed to gain concessions from Walgreens so it can complete the megamerger — knowing that once she steps down, it will be hard for the FTC to win meaningful concessions from the chains, sources said.

Walgreens reached the $9-a-share deal back in October 2015 and has been working for 15 months to get the controversial merger cleared.

Rite Aid’s shares fell 1.5 percent Tuesday, closing at $8.32.

The full-speed-ahead pace of the FTC is not sitting well with CVS Health.

David Denton, chief financial officer of the 9,700-store CVS Health chain, told a small group of people standing on the sidelines of the JPMorgan health care conference in San Francisco on Tuesday that the deal with Fred’s is fraught with danger, according to one person in the group.

The Fred’s deal reminded Denton of Safeway selling 146 stores in the West to Haggen Holdings in 2015 to win antitrust clearance, the person said.

Soon after the deal cleared, Haggen went bankrupt.

Meanwhile, CVS Health officials met Tuesday with FTC staff in Washington to reiterate their view that the deal shouldn’t get approved.

But the executives from the Woonsocket, RI, chain could have saved the airfare. Their efforts will not stop the deal, sources said.

A Walgreens spokeswoman declined comment, pointing to a Jan. 5 statement that it continued to work toward closing the pending deal.

The FTC declined comment.