Workers cross a parking lot to reach a complex of factories, hangars and runways in the predawn darkness of the western Mojave Desert. The 5,800-acre facility is ringed by an elaborate security system and monitored from space by satellites.

At a fence bristling with razor-wire, the men and women pull key cards from their lanyards, flash them on a contact sensor and push through high-gate turnstiles. They put signal-emitting electronics in a bank of storage shelves and then use a computer monitor to confirm their identity and security clearance. The production floor is the size of several football fields and is off-limits to anyone who doesn't have authorization to be in it.

The B-21 Raider is built at U.S. Air Force Plant 42. Defense Secretary Lloyd Austin, top military generals, industry executives and factory workers were invited to attend the presentation of the B-21 in December. Visitors were only allowed to view the aircraft from 75 feet away and it looked like a stingray as it glided through the hangar doors. Austin talked about the B-21 being able to carry nuclear and conventional weapons along with future weapons not yet invented. He made it clear that the risks and costs of aggression far outweigh any possible gains.

In the new Cold War, the B-21 is America's first advanced weapon system. Should the military competition with Moscow and Beijing become more intense, strategists at the Pentagon envision B-21 penetrating those countries' air defenses to strike fortified targets. The Air Force will need at least 100 B-21s in the next few years at a cost comparable to a skyscraper.

New employees are instructed on production methods at a training center before starting on active assembly lines. (Christopher Payne for TIME)

The road to deployable high-tech weaponry is full of expensive failures. The Air Force has been unable to purchase new planes for nearly 40 years. The last time the Air Force bought a bomber, it wanted more than 100 planes. It received 21 aircraft at $2 billion each. There were production delays and engineering issues on that project as well. The B-2 became a symbol of the broken procurement process when it was produced at the same facility.

The question hanging over the B-21 is whether the Air Force has learned from the mistakes of the past. For the past year, TIME has followed the development of the B-21, visiting Plant 42 ahead of the roll out, observing engineering, manufacturing and testing teams, and speaking with more than three dozen military, industry and political personnel involved with the program. The Pentagon's tendency to underestimate risk, technical difficulty and cost is one of the biggest challenges facing the program.

Money isn't the only thing at stake. The success or failure of the B-21 program may determine whether the U.S. retains a long-range bomber advantage over its global rivals.

The northern end of Building 401 is where the B-21 bomber begins its life as a wedge-shaped, granite-colored shell. It goes down the line from one workspace to the next, transforming into a bomber. In the past, airplanes have been made from the inside out, but now stealth airplanes are being made from the outside. The B-21 has hundreds of thousands of pieces. Keeping the jet's exterior as smooth as glass is the goal.

The B-21 features stealth. In order to create a plane that can fly undetected through enemy air space and remain invisible to missiles and fighter jets has been a long process. The B-21 is designed to fly at subsonic speeds and is powered by jet engines. A sponge-like skin is created by applying high-tech coating materials to the rounded exterior of the plane. The B-21 is designed to be stealthier than the B-2 despite the fact that it looked like a tennis ball on radar screens.

To the untrained eye, the B-21 is noticeably smaller than the B 2. As long as we are alive, many of the plane's technical details will remain classified. The Air Force has poured a lot of money into preventing information from being leaked. Suppliers don't know they are making parts for the B-21. Even though they worked on the program, engineers and technicians couldn't tell their families or friends what they did all day. The B-21 technician at Plant 42 says there can be some challenges because they can't talk about what they do. A lot of people worked to make this bird.

Charles and dozens of workers worked on four unfinished B-21s on a Tuesday in November. The work is done by technicians rather than machines. Two planes have been churned out by the B-21 team: T-1 and G-1. Since winning the bomber contract, Northrop has built three new buildings for assembly, renovated workspace, and started new hiring programs to add to the 5,000 people employed on the program. New employees often wait weeks until they get government clearances to investigate potential spies and criminals.

There is a mission to modernize America's aging nuclear missiles.

Jessi Ross, a program director, and Hassan Charles, a surface technician, are among 5,000 employees at Northrop Grumman now working on the B-21 bomber. (Christopher Payne for TIME | A small portion of this image was removed for security purposes.)

There is a strip of offices above the assembly line. There are grinning skulls and pirate themed posters on the walls of the maze. The 1942 U.S. air raid on Tokyo was the inspiration for the B-21's nickname. Virtual modeling and three-dimensional simulation programs are used by the team to identify and eliminate technical issues. As the program nears flight-testing, the company says the digital approach should help cut costs.

The Air Force's B-21 program director is embedded with the team. He believes the technology is detecting some flaws. He says unforeseen issues will inevitably be found when the plane first takes to the skies. If you don't have to learn anything, it would be great. We are aware that we will. Our goal is to learn it as quickly as possible and to be able to make any necessary changes as soon as possible.

The program is on time and on budget. He had to balance the urge to add new capabilities with the fear of being derailed from the schedule. The cascade of mistakes that have long plagued Air Force projects include ever-changing design requirements, unreliable production rates and exploding cost projections. He says that everyone wants a Battlestar Galactica that's packed with technology. Before we can make them better, we need to get the first airplanes out there.

The Air Force says the B-21 is hitting its targets, but it is hard to know the true cost of the plane. The price tag for the bomber is below what the Pentagon said it would cost a decade ago. The numbers published under the Air Force's procurement and "Research, Development, Test and Evaluation" budget lines don't tell the full story. The public won't know if the program gets "black budget" funding if it's classified. The Air Force plans to spend nearly $20 billion on the production of the B-21 over the next five years, but it is not known how many planes will be purchased. The production timelines and rates are categorized.

Chuck Spinney, a retired Pentagon weapons analyst, says that Secrecy is a means to keep foreign adversaries in the dark, but also a means to hide costs. The B-21 is an interesting program but it's difficult to maintain oversight on it. It was done by design. Business as usual. It is either too early to tell or too late to act when we discover that something is wrong.

There are more expenditures to come. Special testing and equipment is required for the B-21. The plane won't be certified for nuclear missions until two years after it enters service, according to Pentagon auditing documents. Analysts think that is a cost-cloaking decision that puts off requests for additional funding into the future. The B-21 is part of a family of systems that may include drones. It is unclear if additional funding will be required for the system to function.

Northrop Grumman has opened new hiring and training pipelines as production on the B-21 program picks up. (Christopher Payne for TIME | A small portion of this image was removed for security purposes.)

William Hartung is a senior fellow with the Quincy Institute for Responsible Government. He says he expects the B-21 to be no different than the others. It isn't a question of whether there will be overruns, but how high they will go, and whether they will lead to massive additional spending or a reduction in the proposed buy of the planes.

The Pentagon's most recent fighter-jet program, the F-35, has been beset with production delays and cost overruns. The Air Force wanted 668 F-22 fighter jets. It cost more than $400 million for a copy. William LaPlante, the Pentagon's chief weapons buyer, said that the suspicion of the B-21's true costs is understandable. He says that since the beginning of the program there has been a lot of skepticism. We need to keep proving to the American people that the program is going well, and we need to hold the military accountable for that.

When Northrop won the B-21 contract in 2015, it was seen as a huge win for the company. Even though Congress spent more than $20 billion on research and development for the B2, the bat-winged bomber turned out to be a delicate creature. Its radar-evading qualities were revolutionary in military technology, but they were also sensitive to everything but perfect weather. According to Air Force statistics, the B-2 spends more time on the ground than any other aircraft. The jet has flown over air shows and sporting events more than above active battlefields. The Government Accountability Office reported in November that it costs $150,000 for every hour it is airborne.

Since the B-2 was invented, stealth technology has come a long way. A small number of employees on the B-21 worked on its predecessor, themselves, and a group of retired engineers are called upon to help avoid pitfalls. The problems that were encountered on the first project may have been alleviated by the battle-scars. Jessi Ross, a B-21 director at Northrop, says she was given a B-2 lessons-learned paper when she first arrived. If we had the chance to do it again, we would want to do better.

While the B-2 needs a temperature controlled hangar, the B-21 will be left outside under a shelter like other planes. The plan is for the doors to pop open on the B-21 when the B-2 doors are removed. It can take months of maintenance for a B-2 to fly, but the B-21 is designed to do it all the time.

Since being awarded the initial contract for the B-21 gold mine, the revenues of the company have increased by over 50%. Air Force officials say it will take at least 30 years to develop, purchase and operate 100 B-21s. The Air Force is expected to order a lot more. The company's chief executive officer says that the jets need to move out of assembly and into the hands of Air Force pilots. At the headquarters of the company in Falls Church, Va., Warden says that they have an obligation to deliver on their promises. The affordability commitment that we make is not just the technical capability that we deliver. That was a challenge for the team on the B-2

Warplanes from China and Russia patrol the Pacific in a show of strength.

The Air Force paid an incentive fee to Northrop for hitting performance targets. In the coming months, the company will be ahead of timelines. The first assembled jets are usually one-off prototypes that need to be heavily modified. The B-21 is more or less ready for production according to officials.

Budget watchers are skeptical. The cost of high-tech systems tend to rise because of unrealistic goals and impractical solutions, according to a retired Marine captain. If the B-21 doesn't live up to its promises, we shouldn't be surprised.

The end of a war like the one in Afghanistan can bring a peace dividend. In the wake of the U.S. retreat from Afghanistan in August 2021, it wasn't the case. The Biden Administration put the U.S. military on alert for a Cold War with Russia and China. The plan calls for the U.S. to confront two nuclear peer-adversaries for the first time in history with a multi-year build-up of weaponry, enhanced foreign alliances and a top-to- bottom $1.2 trillion overhaul of the American nuclear arsenal.

Designers hope that the B-21 is an important part of America's ability to project force around the world. The bomber will be able to share data with other warplanes if it has onboard computers. It will use an open-architecture design to make it easier to update and improve capabilities.

U.S. Air Force Plant 42 is a sprawling aircraft manufacturing complex in the Mojave Desert about 60 miles northeast of downtown Los Angeles (Christopher Payne for TIME)

The new plane is something planners want. The Air Force has the oldest fleet in the country. The majority of the Air Force's 141 bombers are B-52s. The military used to argue for big weapons programs in the last Cold War because they focused on the Soviet Union. In the Asia- Pacific region, extensive distances are an obstacle for any battle plan, and Beijing has spent years investing in its air defense network with sophisticated radars, long-range S-400 surface-to-air missiles, and J-20 stealth fighters. If the U.S. and Taiwan are invaded by China, the systems could prove problematic. Salvos of cruise missiles can be fired from more than 1,000 miles away, but only a bomber can find, identify, and attack mobile missiles threatening U.S. aircraft carriers and other forces.

The B-21 stealth bomber is designed to fly thousands of miles away, slip undetected through enemy air defenses, drop tons of bombs on targets, and clear the way for the U.S. and allied militaries. The B-2 is the only one that can do that.

The B-21 seems to have budgeting tailwinds behind it. Bipartisan support for the program has been generated through lobbying. According to OpenSecrets.org, the company spent over eight million dollars on lobbying in the last four years. The B-21 now provides 8000 jobs in 40 states with the promise of more if production ramps up.

The next challenge will be 25 miles northeast of Plant 42 at Edwards Air Force Base after the bomber has been unveiled. The jet will be pushed to its aerodynamic limits high above the desert. The performance of the B-21 program will reveal whether it's ready to take off.

The reporting was done by Julia Zorthian.

W. J. Hennigan can be reached at william.hennigan@time.com.