The White House has confirmed that the administration has reached a deal with Boeing for two new Air Force One planes.

"President Trump has reached an informal deal with Boeing on a fixed price contract for the new Air Force One Program," a White House spokesman said. "Thanks to the President's negotiations, the contract will save the taxpayers more than $1.4 Billion."

The deal between the Trump administration and Boeing is expected to total $3.9 billion. The Pentagon deferred to the White House.

Some of the savings may have come after Boeing failed to secure a deal with its original buyer: Russia.

The U.S. Air Force told CNBC that the two planes were originally supposed to be sold to Russia. When that deal fell through, the Air Force acquired the aircraft at a slightly discounted price.

The planes never left U.S. soil, the Air Force said. Representatives for Boeing did not immediately respond to CNBC's request for comment.

In December 2016, Trump complained about the $4 billion-plus projected cost of building a new Air Force One plane. He threatened to cancel the "order" in a tweet at the time.

Trump tweet: Boeing is building a brand new 747 Air Force One for future presidents, but costs are out of control, more than $4 billion. Cancel order!

But the deal the White House now supports will carry costs barely below the $4 billion mark. The anticipated $1.4 billion in savings appear to come from a different estimate that totaled over $5 billion.

The deal includes the two new planes and their development program, as well as the construction of a new hangar to house the aircraft.

The White House credited Trump's negotiations with the aircraft manufacturer for the smaller bill in the final deal.

Before his inauguration, then President-elect Trump met with the CEOs of Boeing and Lockheed Martin at his Mar-a-Lago resort in Florida and discussed ways to lower the cost of the planes' development. After that meeting, Muilenberg gave Trump his "personal commitment" that Boeing would lower costs below $4 billion.

In a tweet on Tuesday, Boeing celebrated the deal that it says will provide "American Presidents with a flying White House at outstanding value to taxpayers."

Boeing tweet

The aircraft themselves only account for about a fifth of the cost, said Richard Aboulafia, vice president of the aviation analysis firm Teal Group. Much of the cost comes from outfitting the planes for the president, including ensuring communication equipment is secure and the plane is self-sufficient.

"The planes are just a minority cost of the program," Aboulafia said.

The Boeing 747-8 was first selected to serve as the next Air Force One in January 2015. The 747-8 and France's Airbus A380 were the only two four-engine plane designs with a wide enough body to accommodate the needs of a presidential carrier, according to the Air Force.

The planes in the deal announced Tuesday are VC-25Bs, the military counterpart to the 747.

--CNBC's Leslie Josephs contributed to this report.