On the outskirts of New Mexico’s largest city, a team of engineers at Sandia National Laboratories is engaged in a long-running treasure hunt to make sure the oldest weapon in America’s nuclear arsenal, the B61 bomb, remains safe for deployment.

They cannibalize spare B61s for parts, such as the vacuum tubes needed to keep the radars working on active bombs. If they don’t have spares, they track down outdated machines to manufacture the components themselves, as they did when they bought a machine to produce integrated circuits.

But after the manufacturer of the circuits went bankrupt and its machines were no longer available, the Sandia engineers had to become even more innovative.

“We bought three or four on eBay,” Gilbert Herrera, who manages Sandia’s microsystems research and facilities, said as he stood on the work floor recently. “For $100,000 apiece.”

The B61 was once heralded as a cornerstone of the country’s air-delivered nuclear force. Developed as a major deterrent against Soviet aggression in Europe, it is a slender gray cylinder that weighs 700 pounds and is 11 feet long and 13 inches in diameter. It can be delivered by a variety of aircraft, including NATO planes, anywhere in the world.

Now, nearly five decades after the first version rolled out of Los Alamos National Laboratory 100 miles north of here, age threatens to make the workhorse of the arsenal unreliable. So the B61 is poised to undergo a major renovation to extend its life span, a project that could cost as much as $10 billion, according to the Pentagon, or about $25 million for each of the 400 or so left in the arsenal.

The current estimate is more than double some early projections, so high that the Federation of American Scientists, a respected Washington disarmament think tank, dubbed it the “gold-plated nuclear bomb project.”

The Obama administration and Congress have pushed the program forward despite the enormous cost of refurbishing such complex weapons and over the strenuous objections of some nuclear strategists, who say the threat the B61 was designed to counter disappeared with the Cold War. Advocates, including the Obama administration, argue that the bomb is still essential to U.S. national security. In their view, the B61s deployed in Europe are the most concrete example of shared responsibility among the NATO countries, providing the indispensable psychological glue that binds the often-fractious alliance.

The B61s represent less than 10 percent of the 5,113 bombs and missiles that make up the U.S. nuclear arsenal. In the coming decade, updating vast elements of the nation’s nuclear weapons complex — from weapons to delivery systems to the labs and plants that make and test them — is expected to cost at least $352 billion, according to the Stimson Center, another nonpartisan Washington think tank.

Eighty percent of the stockpile’s bombs and missiles are scheduled for major renovations similar to those for the B61. The National Nuclear Security Administration, which oversees the complex, predicts that the work will take 25 years of intense effort by the country’s leading physicists, material scientists, engineers and computer programmers. The NNSA has not put a cost on the total weapons overhaul, but it is certain to top $20 billion, according to preliminary government figures.

The B61 provides a case study in the expense and innovations driving the ambitious effort to maintain the nation’s nuclear defenses at a time of fiscal constraints and a shift away from reliance on nuclear deterrence.

The most versatile in the stockpile

Sandia National Laboratories is the engineering center of the U.S. nuclear weapons complex, a sprawling collection of labs and warehouses at Kirtland Air Force Base on the eastern edge of Albuquerque. Sandia’s primary mission is ensuring the safety, security and reliability of the nuclear arsenal.

Inside one of those warehouses, on a gray-painted floor, sits a full-scale replica of the B61. The model is where young engineers and nuclear maintenance technicians learn to care for the aging weapon. A preflight control panel displays the commands that technicians are trained to carry out: “Delivery/Option/Delay” and “Strike Enable” to detonate the fearsome bomb.

The device looks simple, but its appearance is deceptive. Inside are 6,500 parts, making the bomb one of the most complex weapons in the arsenal. The firing mechanism alone has 400 components.

Built to withstand supersonic speeds, the B61 is the most versatile weapon in the stockpile. It can be carried long distances by a wide number of aircraft, from a B-2 stealth bomber flying from a base in Missouri to North Korea or China to an F-16 or Tornado jet fighter flying to Russia from a NATO base in Europe.

The versatility extends to the explosive power. Different variations produce different yields, the “dial-a-yield,” or DAY. Depending on the warhead, the president could choose an explosion slightly less powerful than the one that destroyed Hiroshima in 1945, or he could dial it up to a thermonuclear blast 30 times as strong.

The B61 can be dropped free-fall or with a parachute, detonated in the air or on the ground. Its Kevlar parachute, wrapped so tightly it is as hard as an oak tree’s trunk, can slow the bomb’s descent speed from 1,000 mph to 35 mph.

Five versions are still in service. The latest is the B61-11, activated in the mid-1990s as the only ground-penetrating nuclear weapon, known as the “bunker buster.” It is designed to reach hardened bunkers buried far underground and to detonate its nuclear payload on a time delay.

As the most modern version, the bunker buster will escape renovation. The other four models will be collapsed into a single version, an experiment never tried before, according to nuclear weapons experts.

Tight deadline for reinvention

Modernizing a nuclear weapon is not like upgrading any other machine. In the automobile industry, for example, cars are improved each year to reflect the latest technological advances and design changes. By contrast, few of the B61’s major components have been rebuilt to 21st-century, digital-age standards.

Most of the new components will not be replacements. They will be completely new, state-of-the-art versions, designed and built with equipment that did not even exist when the first iterations were turned out in the mid-1960s. “The entire arsenal was built with less computational power than what’s inside an iPhone,” one weapons manager said.

Arrays of supercomputers, advanced electronics and astonishingly detailed simulations will be used to renew the B61. The bombs will get new batteries, new neutron generators to ignite the thermonuclear explosion and new radar systems to signal when the bomb should detonate. New tail kits and special electronics will transform the B61 into the first precision-guided nuclear bomb, which means the designers can get rid of the parachute.

The first renovation must be completed within five years — a blink of an eye in the world of nuclear design and engineering — and all of them have to be done by 2022. If the work veers off schedule — something the Government Accountability Office and the Pentagon say they fear, given the NNSA’s record of delays and cost overruns — the life expectancy of the old bombs will expire and they will no longer be regarded as reliable.

Even if the work meets the deadline, the B61 faces an uncertain future outside the United States. Some NATO countries see nuclear weapons as the last remnant of the Cold War and face increasing calls from anti-nuclear and environmental groups to get them off their soil.

In Germany, popular support is growing for removing the B61s stationed at a German air force base near the village of Buchel in the western part of the country. Short of such a drastic step, the German government has not committed to paying for the expensive upgrades required to carry nuclear weapons when it replaces its aging fleet of Tornado aircraft with the new Eurofighter.

The plans of NATO allies are not the only threat to the B61. Some members of Congress have questioned the soaring cost of the redesign and the old bomb’s place in the modern arsenal.

Computer-simulated explosions

The B61 traces its lineage to the first nuclear test, which occurred on the morning of July 16, 1945, in the desert near Alamogordo, N.M. The detonation of the first atomic bomb at the Trinity Site took place less than three weeks before the bomb called Little Boy was dropped on Hiroshima on Aug. 6, killing 70,000 people instantly and at least the same number from radiation exposure and injuries over the next five years.

In the years that followed, the United States conducted more than 1,000 nuclear tests as it perfected and expanded its nuclear arsenal during the arms race with the Soviet Union. Hundreds of tests also were conducted by other nuclear powers, including the Soviet Union, Britain, France and China. President George H.W. Bush called a halt to U.S. nuclear tests in 1992. His decision was reaffirmed in 1996 when President Bill Clinton signed the Comprehensive Test Ban Treaty. The Senate rejected the treaty in 1999 and has not voted on it again, but the ban has remained in place. Russia, Britain and France are among the 36 countries that have ratified the treaty.

Without the ability to test, the United States still must guarantee that its arsenal is reliable and safe. So nuclear physicists and computer engineers have turned to mimicking nuclear explosions through some of the world’s most sophisticated computer simulations.

The virtual tests occur at the Los Alamos laboratory. From a glass-enclosed viewing room, a visitor can see supercomputers with 32,000 processors lined up in a vast, sterile room. Together, the machines can run 1.35 petaflops of data per second — a single petaflop is the equivalent of a million billion calculations. Lab officials said it takes programmers six months just to write the code to create a simulation of that magnitude. And the supercomputers and processors need an additional three weeks of churning 24 hours a day every day to process the code, even at petaflop speed.

The best view of this miracle of engineering and science is from inside what programmers call the “cave,” an array of high-resolution monitors in X Division, the weapons-design section at Los Alamos. The results are mind-boggling in their detail and precision, a true-to-life simulation that allows scientists to test the properties of materials and components used in a thermonuclear weapon without actually detonating a device.

Wearing three-dimensional glasses and standing on the cave floor, the rare outsider can watch animations that don’t just look like a missile hitting a wall and crumpling, but depict the actual way a missile hitting a wall would crumple, down to the molecular level of the metals used in the missile’s nose cone, body and tail fins.

Another simulation, restricted to personnel with only the highest security clearances, re-creates the reaction inside the thermonuclear explosive package of a warhead. It shows the signal sent to the detonator and the detonation of high explosives that trigger the critical mass. The trigger ignites the primary radioactive plutonium component, which in turn sets off the secondary uranium device, which in turn dramatically increases the power of the blast.

The advances in computer simulations, combined with the data from actual past tests, have allowed scientists to understand more about the physical attributes of nuclear weapons than the scientists who invented them. Now, they say, this knowledge will allow them to add 20 years to the quiet life of the B61. But not more.

Staggering sums

All of this modernization and invention requires staggering sums, time and testing. Twenty-eight teams of scientists and engineers at Los Alamos and Sandia determined what would be required in terms of new technology to update the B61 — and how much it would cost.

In the fall of 2011, a little-known interagency group called the Nuclear Weapons Council gathered in Washington to hear the results of the project. The council coordinates work by the NNSA and Pentagon on nuclear weapons and must approve any technical changes. Its members include senior officials from the Defense Department and the Energy Department and the head of the NNSA.

When the group gathered a year ago and first heard the new price tag for the B61, there was stunned silence even in a roomful of people accustomed to dealing with billions of dollars. “It was the trigger that sucked all the air out of the room,” one participant said.

The cost was $7 billion for an estimated 400 bombs. The explanation was that it had climbed so high in part because designers had added more safety features to an already nearly foolproof bomb, namely an optical scanner that required a retina scan from authorized personnel. Eventually the scanner and some other new equipment were dropped to save money, cutting the cost to $6 billion.

But recently, an independent Pentagon assessment concluded the cost would actually be much higher — at least $8 billion and possibly as high as $10 billion, according to Sen. Dianne Feinstein (D-Calif.), chairman of the Senate Appropriations subcommittee on energy and water development, which has funding jurisdiction over the NNSA. Officials at the agency say it is too early in the process to have an accurate budget figure for the program.

The soaring cost has rippled through other modernization programs. To try to keep the entire stockpile overhaul within budget, the administration delayed refurbishing two other aging warheads used on Minuteman intercontinental ballistic missiles by three years and pushed back construction of a new nuclear-armed submarine by two years.

In the complex matrix of repairs and deployments, the two-year delay in submarine modernization means that at some point in the near future, the nuclear-armed sub fleet patrolling the oceans will be reduced by two vessels for a period of time.

Each delay adds to the cost of maintaining the nuclear status quo. But the work goes on. An Air Force team with a $340 million budget is trying to figure out how to mount the B61 onto its new F-35 fighter jet, which itself is expected to be the most expensive weapon in U.S. history. And once the B61 overhaul is completed, the nation’s vast nuclear weapons complex will turn its attention to the next major weapons renovations: the W78 and W88, a pair of thermonuclear warheads whose redo is already predicted to cost at least $5 billion more.

Julie Tate contributed to this report.