Donald Trump took to Twitter this week to blast plane-maker Boeing and its specialized presidential aircraft, commonly known as Air Force One.

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

The social media comment quickly reverberated across both the Pentagon and the aviation industry. Within 30 minutes, Boeing’s stock price had dropped by $2.

The Chicago-based aviation firm flew into damage control mode, insisting taxpayers were getting the “best value” for their money. Air Force Secretary Deborah Lee James publicly defended the project from Trump’s attacks, bluntly noting that building the planes was “a bit more complicated” than Trump seemed to think.

"[Air Force One] is way, way more than what you would think of as a commercial airliner," she told Politico. “It really is, in many ways, a flying White House.”

James is right. It is a White House, but one that engineers and security experts have to stuff inside a relatively small metal tube that can fly around the world. The jets have to provide similar services to those found in Oval Office and protect against enemy radio jammers, spies trying to intercept information, hostile surface-to-air missiles and fighter jets, and even the electromagnetic pulse from a nuclear bomb going off nearby. And after the 9/11 terrorist attacks, the US Secret Service became particularly wary of bombers and sabotage.

Then there’s just the potential for a devastating accident. Teams of contractors have to check the fuel that goes into Air Force One’s tanks and must keep the aging aircraft in near perfect condition inside and out. When the planes aren’t in use, they’re stored at Andrews Air Force Base outside of Washington, inside a heavily protected hangar with round-the-clock armed guards.

That means the reason the iconic aircraft cost so much isn’t that greedy contractors are trying to shake as much money as possible out of the government. It’s also a story of how the government itself keeps demanding that more high-tech features be added to the plane — and how those changes push the total price tag higher and higher. By most estimates, the two new planes are likely to cost at least $3 billion when they come into service in 2024.

For all intents and purposes, Air Force One is a symbol of America’s power and prominence on the world stage. It’s also a symbol of just how much the US is willing to spend to keep the president safe. During the 2016 fiscal year, the Air Force was spending approximately $180,000 every hour Air Force One was in the air. That eye-popping price tag has led lawmakers from both parties to routinely criticize presidents for taking the planes out on seemingly frivolous or partisan outings.

Air Force One has been around for decades. It’s been controversial just as long.

Squabbles over Air Force One aren’t new. In 1944, President Franklin Roosevelt told the US military to create a unit dedicated to flying around the commander in chief and associated staff. The Secret Service flatly rejected the very first potential presidential plane — based on the C-87, itself a converted B-24 bomber — because they felt it wasn’t safe enough.

In February 1945, a glistening silver VC-54 transport plane took Roosevelt to Yalta so he could meet with British Prime Minister Winston Churchill and Soviet Premier Joseph Stalin. Eight years later, the Pentagon dubbed President Dwight Eisenhower’s more powerful VC-121 Constellation “Air Force One.”

The nickname came about after an incident in which the presidential flight ended up with the same abbreviated “call sign” as a commercial airliner. The confusion could have been dangerous as air traffic controllers on the ground rushed to clear up where each plane was overhead.

Technically, any Air Force plane carrying the president becomes Air Force One. The same goes for a plane from any of the other military services. A US Marine Corps helicopter with America’s top official on board is Marine One, and so on and so forth.

However, over the years, the moniker became rightly associated with the planes the Air Force bought and flew specifically for the task of ferrying around the commander in chief and his family. The most recent of these are a pair of converted 747-200B airliners, which the Pentagon officially calls VC-25s.

During the 2016 fiscal year, the Air Force was spending approximately $180,000 every hour Air Force One was in the air

On these jets, “the president and his travel companions enjoy 4,000 square feet of floor space on three levels, including an extensive suite … that features a large office, lavatory, and conference room,” according to the official White House page. “Air Force One includes a medical suite that can function as an operating room, and a doctor is permanently on board.”

The repurposed airliners can carry more than 70 people to destinations nearly 8,000 miles away. The kitchen staff can serve up to 100 individuals if necessary; each Air Force One has two separate galleys.

Most importantly, the four-engine jets can refuel in midair, allowing them to fly indefinitely — or at least until the food and water runs out. All of the plane’s communications and avionics equipment is encased inside a shell that blocks dangerous electromagnetic pulses.

These two last features were very important during the Cold War, when the threat of a nuclear war with the Soviet Union was very real. The idea was that if the president was flying when the bombs and missiles started falling, or really during any sort of devastating global crisis, he or she would stand a better chance of surviving to lead whatever was left of the country.

As a result, this plane became a popular setting in pop culture. After aliens attack Earth in the 1996 movie Independence Day, Air Force One rushes the president off to safety. In 1997, Harrison Ford’s President James Marshall battled terrorists on the plane itself in Air Force One.

Turns out flying the president around the world safely is very expensive

All of these specialized modifications came with a hefty price tag. When the Pentagon finally ordered the VC-25s from Boeing in 1987, they each cost $325 million, equal to more than $600 million in 2016 dollars.

And that figure doesn’t take into account subsequent upgrades or the cost of actually operating the planes. As the aircraft get older, components wear out and spare parts become harder to find, which mean those costs will only go up. Boeing hasn’t even made the -200 version of the 747 since 1991.

So in 2009, the Pentagon started actively working on plans for a new Air Force One. From the start, the project has been dogged by a constantly growing list of technical requirements for the new planes. After six years of budget battles and other wrangling, the Air Force insisted that it had hired Boeing, but not necessarily agreed to buy 747-8s.

It is possible neither party was really sure the planes would be able to carry all of the requisite gear and provide the appropriate protection. The final aircraft could end up as an entirely new version of the classic airliner.

“There are professional security people who are in the White House who develop requirements for Air Force One," James, the Air Force secretary, stressed after Trump’s comments. "We didn't make up all these security factors and communications standards.”

This means that any new Air Force One will likely be an expensive proposition. As of September 2016, the Pentagon had given Boeing nearly $170 million in contracts, including $25 for “classified requirements.” This was the source of the US military’s preferred figure on the project’s cost.

Covering only the developments so far rather than the grand total of the project, this number is effectively meaningless. As of 2016, the Air Force had actually planned to spend nearly $3 billion for the project between the 2015 and 2021 fiscal years.

The final cost is still very much unknown, as the Air Force has not even finalized the exact requirements for the planes — and it is important to remember that the contracts cover two new Air Force Ones. The Air Force wants the new planes to keep flying for three decades after they finally arrive, hopefully on schedule, sometime in 2024.

As it stands now, Boeing, the only American aircraft maker still building sufficiently big airliners, plans to convert its latest 747 model, the -8, into the special transports. The new model will have approximately the same range as the older aircraft but will be significantly more fuel-efficient with its improved General Electric GEnx jet engines.

Boeing already pitches a more luxurious, but far less advanced, VIP version to wealthy private customers to the tune of $360 million per plane.

Sorry, Mr. President-elect: Trump Force One simply isn’t good enough

Trump has repeatedly stated that he could save taxpayers money by just using his own, smaller Boeing 757 jet. The mogul bought the plane, which the media nicknamed Trump Force One during the 2016 election, from Microsoft co-founder Paul Allen for $100 million approximately five years ago.

Afterward, Trump added solid gold accoutrements, wood paneling, and more to the twin-engine jet. “It's bigger than Air Force One, which is a step down from this in every way,” he bragged to Rolling Stone in 2015.

In case you’re wondering, Trump’s plane doesn’t come remotely close to matching the power or capabilities of the current Air Force One or the fleet’s planned replacements. His plane isn’t prepared to fly near or through active war zones full of militants packing shoulder-launched surface-to-air missiles, or to survive a nuclear attack. Its communications systems wouldn’t allow him to securely make a call, send an email, or compose a tweet without fear of the information being intercepted by other governments.

If the Pentagon accepted Trump’s offer, in other words, it would have to spend hundreds of millions of dollars, or more, to bring it up to suitable specifications.

Oh, and just one plane isn’t enough. The Air Force has two new Air Force Ones in no small part to improve the chances that one will always be ready to go in an emergency.

On top of that, the VC-25s are just one part of the Air Force’s larger “special airlift mission” fleet. The president and vice president have both flown on smaller C-32s, based on Boeing’s 757 like Trump Force One, to airports that simply can’t accommodate the larger planes. On major state visits, the whole presidential entourage doesn’t fit into a single jet, either, with other aircraft bringing along all sorts of other security teams, vehicles, and specialized equipment.

“It's bigger than Air Force One, which is a step down from this in every way,” Trump has bragged about his own plane

These details might not matter to Trump. On December 7, 2016, the businessman declared he would personally negotiate the deal with Boeing.

Whatever happens, Trump’s comments sent ripples through America’s aviation industry. While Boeing’s stock rebounded, the company’s top executives have sparred with Trump before, during, and since the campaign over various policy issues, including factories in China and the future of the US Export-Import Bank.

“Boeing is … going to set up a massive plant in a big section of China,” Trump complained in a stump speech in September 2015. “That will end up taking a tremendous number of jobs away from the United States.”

“Boeing is building massive facilities in China,” he reiterated on KIRO radio in Seattle, where the aviation firm has major production facilities, nearly a year later. “If I’m president, that won’t happen.”

Shortly before the now-infamous tweet, Boeing CEO Dennis Muilenburg defended his company’s Chinese connections and seemed to make veiled jabs at Trump in an interview. “I'm not a political pundit or prognosticator … but anyone who paid attention to the recent campaigns and the election results realizes that one of the overarching themes was apprehension about free and fair trade,” he told Chicago Tribune reporter Robert Reed.

“Last year, we delivered 495 737s from our factory in Renton, Washington, to customers around the world,” Muilenburg continued. “One in every three of those 737s were bound for China.”

Other firms might worry that their business practices could run afoul of Trump’s personal views and threaten their lucrative contracts for designing equipment made to protect the president and his family. Top defense contractor Lockheed, which now owns the helicopter maker Sikorsky, probably looked at the recent spat with some interest.

In 2014, the Pentagon hired Sikorsky to build the new Marine One chopper. In 2009, President Barack Obama had rejected an earlier iteration of the project and canceled a multibillion-dollar contract with Lockheed.

Obama, Secretary of Defense Robert Gates, and prominent legislators like Sen. John McCain, an Arizona Republican, complained that the presidential helicopter program had become bloated and overcomplicated. They ditched the initial plan and decided to refine the requirements and issue a new deal.

“It is an example of the procurement process gone amok, and we're going to have to fix it,” Obama said at the time. “The helicopter I have now seems perfectly adequate to me.”

Depending on his success with Boeing and his feelings about Lockheed, Trump could pull a similar stunt over Marine One’s cost or progress. The US Navy expects the first of these VH-92s will be ready for the president and other dignitaries in 2020.

The new Air Force Ones, whatever their final costs, aren’t scheduled to come online until 2024. That means Trump can safely criticize the program for one simple reason: It will be his successor, not the president-elect, who will actually be the one to first fly aboard the new planes. For his part, Trump will be stuck flying Trump Force One.