EGLIN AIR FORCE BASE, Fla. – With an ear-ringing roar, the matte-gray fighter jet streaked down Runway 12 and sliced into a cloudless afternoon sky over the Florida Panhandle. To those watching on the ground, the sleek, bat-winged fuselage soon shrank into a speck, and then nothing at all, as Marine Capt. Brendan Walsh arced northward in America’s newest warplane, the F-35 Lightning II.

The F-35 has features that make pilots drool. It is shaped to avoid detection by enemy radar. It can accelerate to supersonic speeds. One model can take off and land vertically. Onboard electronic sensors and computers provide a 360-degree view of the battlefield on flat-panel screens, allowing pilots to quickly identify targets and threats.

But its greatest strength has nothing to do with those attributes. The Defense Department and Lockheed Martin, the giant contractor hired to design and build the plane, also known as the Joint Strike Fighter, have constructed what amounts to a budgetary force field around the nearly $400 billion program.

Although it is the costliest weapons system in U.S. history and the single most expensive item in the 2013 Pentagon budget, it will face only a glancing blow from the sequester this year. And as the White House and Congress contemplate future budgets, those pushing for additional cuts may find it difficult to trim more than a fraction of the Pentagon’s proposed fleet, even though the program is years behind schedule and 70 percent over its initial price tag.

The reasons for the F-35’s relative immunity are a stark illustration of why it is so difficult to cut the country’s defense spending. Lockheed Martin has spread the work across 45 states — critics call it “political engineering” — which in turn has generated broad bipartisan support on Capitol Hill. Any reduction in the planned U.S. purchase risks antagonizing the eight other nations that have committed to buying the aircraft by increasing their per-plane costs. And senior military leaders warn that the stealthy, technologically sophisticated F-35 is essential to confront Iran, China and other potential adversaries that may employ advanced anti-aircraft defenses.

The biggest barrier to cutting the F-35 program, however, is rooted in the way in which it was developed: The fighter jet is being mass-produced and placed in the hands of military aviators such as Walsh, who are not test pilots, while the aircraft remains a work in progress. Millions more lines of software code have to be written, vital parts need to be redesigned, and the plane has yet to complete 80 percent of its required flight tests. By the time all that is finished — in 2017, by the Pentagon’s estimates — it will be too late to pull the plug. The military will own 365 of them.

By then, “we’re already pregnant,” said Air Force Lt. Gen. Christopher Bogdan, who oversees F-35 development for the Pentagon.

When the F-35 finishes testing, “there will be no yes-or-no, up-or-down decision point,” said Pierre Sprey, who was a chief architect of the Air Force’s F-16 Fighting Falcon. “That’s totally deliberate. It was all in the name of ensuring it couldn’t be canceled.”

The Pentagon has long permitted equipment to be produced while it is still being tested, with the intent of getting cutting-edge gear to warriors more quickly, but senior military officials said the F-35 takes the approach to new extremes. Doing so has served as more than a hedge against cuts – it has also driven up the overall price. The 65 aircraft that already have been built, and those that will be assembled over the next few years, will require substantial retrofits that could cost as much as $4 billion as problems are uncovered during testing, the officials said.

Initial tests already have yielded serious problems that are forcing significant engineering modifications. The entire fleet was grounded earlier this year because of a crack in the fan blade in one jet’s engine. The Marine Corps’ version has been prohibited from its signature maneuver — taking off and landing vertically — because of a design flaw. And the Navy model has not been able to land on an aircraft carrier because its tail hook, an essential feature to alight aboard a ship, needs to be redesigned. The Pentagon’s top weapons tester issued a scathing report on the F-35 this year that questioned the plane’s reliability and warned of a “lack of maturity” in performance.

When the F-35 program was first approved by the Pentagon, Lockheed Martin said it could develop and manufacture 2,852 planes for $233 billion. The Pentagon now estimates the total price tag at $397.1 billion. And that is for 409 fewer planes.

The overall program is almost four times more costly than any other weapons system under development. Taxpayers have already spent $84 billion on the plane’s design and initial production. By contrast, the production of 18,000 B-24 bombers during World War II cost less than $60 billion, in inflation-adjusted dollars.

To the plane’s backers, including senior leaders of the Air Force and Marine Corps, the benefit is worth the cost. Unlike the infantry, which still accepts battlefield casualties as part of war, military aviators have grown accustomed to a different risk calculus since the 1991 Persian Gulf War, when U.S. warplanes quickly established air superiority over Iraq with minimal losses: They want to ensure that, whatever the future conflict, their planes are packed with enough offensive and defensive measures to accomplish the mission and avoid getting shot down.

“This aircraft reinforces the way Americans go to war. …We don’t want to win 51-49. We want to win 99 to nothing,” said Lt. Gen. Frank Gornec, the assistant vice chief of staff of the Air Force. He said he is convinced the F-35 “will become a superstar in the arsenal of the United States.”

Many independent defense analysts do not share that conviction. To them, the plane’s political engineering and buy-before-you-fly procurement mask deep problems with performance and affordability.

“It was a bait-and-switch operation; we were overpromised benefits and under-promised costs,” said Chuck Spinney, a former Pentagon analyst who gained widespread attention in the 1980s for issuing pointed warnings about the military’s pursuit of unaffordable weapons. “But by the time you realize the numbers don’t add up, you can’t get out of the program.”

The jet’s chronic problems were not secret. But with wars raging in Iraq and Afghanistan, and military budgets growing year over year, Defense Secretary Donald Rumsfeld paid little attention to the program. His successor, Robert M. Gates, took the same approach during his first few years on the job. In 2007, the Defense Department permitted Lockheed to begin producing the fighter — before the first flight tests had even begun. Frank Kendall, who is now the Pentagon’s chief weapons buyer, has called that decision “acquisition malpractice.”

With costs rising at supersonic speeds, Gates grasped the dysfunction in 2009. The following year, he withheld $614 million in fees from Lockheed, fired the two-star Marine general in charge of the program and brought in a Navy vice admiral, David Venlet, to clean house. In 2011, Gates placed the Marine plane on probation, warning that it would be killed if problems with its propulsion system were not fixed quickly.

Bogdan, who served as Venlet’s deputy until December, when he took charge of the development effort, was astounded by what he found when he delved into the program.

“It was an unimaginable mess,” he said.

Bogdan’s leverage is limited. Behind his feisty language lies an inescapable reality: The services don’t want to shrink their orders, and Congress doesn’t want to clip the F-35’s wings. For many legislators, the F-35 is as much about employment as it is about air superiority.

His best defense against cuts, he figures, involves showing that the long-troubled program can finally meet its targets – and that more reductions will just mean more-expensive aircraft. “We have to understand there are trade-offs every time we cut spending on the F-35,” he said. “And none of them are very good.”