The “Doomsday Plane” weighs 800,000 pounds when fully loaded and can withstand the effects of a nuclear bomb or asteroid blast while remaining aloft for 12 hours without refueling. First deployed in 1974, the Boeing E-4B has been the preferred mode of long-range transportation for US secretaries of defense ever since. But when Ashton Carter's staff discovered the behemoth would literally crush the runway in Sun Valley, Idaho, where he planned to attend the annual gathering of tech elite at the Allen & Co. conference, the SecDef nimbly switched to a sleek Gulfstream V. He jetted in with just a few aides, his wife (the conference is something of a family affair), an overnight bag weighing less than 10 pounds—and the message that the US military has a new spirit of agile entrepreneurialism.

The DOD of course has a long history of jump-starting innovation. Historically, it has taken the megafunding and top-down control structures of the federal government to do the kind of investing required to create important technology for the military. Digital photography, GPS, the Internet itself—all were nourished by defense contracts before being opened up to the private sector, which then turned them into billion-dollar industries.

Now the flow has reversed. Defense has been caught in the throes of the same upheaval that has disrupted legacy industries, unseated politicians, and upended global dynamics. In the digital age, innovation more often comes from smaller entrepreneurs than from the hierarchical structures that were the hallmark of 20th-century government and business. Over the past decade, the cost of computing has plunged, enabling anyone with a laptop to launch globe-spanning enterprises (see: Facebook, Uber, Square). Sure, the Pentagon’s R&D arm, Darpa, continues to incubate forward-thinking ideas, but it’s planning for a distant future; across town at the Pentagon, many computers are still running software that was programmed in the 1980s—long before many of today’s soldiers were born.

More broadly, this disruption has made it a lot harder to protect the world’s biggest superpower. Enemies of the US were once mainly hulking nation-states. But the biggest tech breakthroughs of the past decade—smartphones, social networking, cloud computing, drones—have put the tools of warfare into anyone’s hands, including terrorists, militant groups like the Islamic State, and hacker collectives for hire by authoritarian governments. As Moises Naim wrote in The End of Power, “In the 21st century, power is easier to get, harder to use—and easier to lose.”

The task falls to Carter to pilot the 2.2 million-member armed services—whether the 10,000 soldiers on duty in Afghanistan for the foreseeable future or the 1,000 pros staffing the US Cyber Command—into a world where swift-moving strategy is more important than brute force, and a global military needs both. Carter, who has been in the job for 10 months now, is betting heavily on Silicon Valley. He believes the hardware and software its engineers and entrepreneurs dream up have unlimited potential to help the military do its job. What’s more, he argues, Silicon Valley—and tech entrepreneurs more broadly—can teach Defense a lot about flexibility, speed, and new ways to work.

For its part, the tech sector remains wary. Defense contracting is notorious for bureaucratic lethargy and technological backwardness. And executives are leery of appearing to be too close to the US government while they seek to expand overseas. Put bluntly, they don’t want to alienate potential customers. (Case in point: Execs from Apple, Facebook, and Microsoft met with Chinese president Xi Jinping in late September in Seattle even as the Obama administration considered sanctions against China for cyberespionage.) And more than two years after former contractor Edward Snowden leaked documents revealing the National Security Agency, which is run by Defense, had intercepted data from Facebook, Google, and other companies, many in Silicon Valley still hold a grudge. The leaks showed that the government had lied to companies, purporting to help protect them from surveillance while at the same time spying on their data-center traffic.

Obama believed Carter could help mend this relationship. Carter had done two stints at the Pentagon earlier in his career, and at the time of his appointment was a lecturer in international studies at Stanford. The Valley is a place where brainpower is its own kind of currency, and Carter, who holds a PhD in theoretical physics from Oxford, made an impression on the locals. “For long airplane flights, he gets a pile of textbooks from the university bookstore, and he’ll read for 12 hours!” says Marc Andreessen, cofounder of the venture capital firm Andreessen Horowitz. “To have someone who is that curious about the world in a position like secretary of defense is a really special thing.” Andreessen and his cohort have a healthy respect for Carter, forged through their common belief that science, when properly harnessed, can help society make great leaps. Carter, for his part, nurses the quixotic belief that tech’s best and brightest will, if nudged and properly inspired, tap into the same sense of public service that first compelled him to join the government.

And so on this July morning, having swapped out his slacks for blue jeans and removed his tie, he walks briskly across Sun Valley’s mountainous desert resort, his aides hanging back a few feet to avoid the snapshots of the photographers. He joins Charlie Rose for a conversation before a couple of hundred startup founders, CEOs, and public intellectuals. Rose quizzes Carter on everything from the dismal efforts to train soldiers to combat the Islamic State to the legality of encryption. Carter tries to strike a balance between what the government says it needs (no encryption!) and what the tech community says it needs (encryption!). When Rose asks if the government should be allowed a backdoor into private communications, Carter replies, “I don’t always think backdoors are the right answer.” It’s a phrase designed to elicit head nods from the audience, but he also says, “The challenge we all need to work out is how to have that freedom and protection individually while also being able to protect the public from terrorists and criminals.” He may not be saying anything they haven’t heard before, but they seem to be willing to give him a pass. While listening to Carter talk, one CEO emails me, “He’s doing very well!!”

Wooing Silicon Valley may prove easier than the battles Carter faces on his home turf. The Pentagon is a bulging, labyrinthine, inefficient organization with misaligned resources—the military has 25 percent more real estate than it needs, for example, but not enough hackers. And while there’s much to loathe in its procurement process, the basic rules exist to stop no-bid contracts and other abuses of our tax dollars. Yet somehow Carter must instill the seeds of a cultural and logistical overhaul that will make the modern military-industrial complex nimble enough to provide the kind of innovation and support its 21st-century fighting force needs.

Carter wants more mixing: Place career officers in agile private companies for a few months. And invite techies to spend time at the DOD.

On his first day on the job last February, he introduced an initiative he calls Force of the Future, designed to transform the personnel system so that, among other things, people can move in and out of the military more easily. He also plans to reform the procurement process just enough to make it simpler for startups to do business with the DOD. And he has established a beachhead on the West Coast, just 4 miles from Google in Mountain View, California, that will scout for companies, people, and ideas that can help the Pentagon. He calls it the Defense Innovation Unit Experimental.

*“*I’m a man in a hurry,” he says shortly into our first interview. He says this a lot, and it needs to be true. He has just a year to jump-start this change before a new administration will likely bring in a new SecDef. He can’t fix the military in that time, but he can change it. He can imprint upon it a new, more flexible way to work that will help it fix itself. The stakes are high because the global ecosystem we live in is precarious. And security is like oxygen. When you have it, you don’t notice it. But when it is gone, you do not survive long.

Only a couple of months after taking office, Carter returned to Silicon Valley to deliver a speech at Stanford, the first time in two decades that a secretary of defense had made the pilgrimage. After the talk, his five-car motorcade rolled up in front of the Andreessen Horowitz office. Andreessen was on paternity leave; cofounder Ben Horowitz hosted Carter for a roundtable conversation with entrepreneurs from a dozen companies. The mood was relaxed, and the entrepreneurs spoke freely. “One guy said, ‘We’d love to work with the government, but some of our engineers live a certain lifestyle where they wouldn’t get clearance,’” Horowitz remembers. “He was talking about weed.”

Carter waved off the culture clash. When it comes to security clearances, he explained, the government tries to determine two things: First off, are you a spy? Second, is there something you’re doing for which you could get blackmailed? “Marijuana is like blue laws these days,” Horowitz says Carter told them, insinuating that it wouldn’t be a problem. It’s a position he defends. “We need to be realistic about the world in which we live,” Carter says. “It’s an example of how we need to be flexible with people.”

Flexibility is at the heart of Carter’s plan to reimagine the Pentagon’s workforce, making it easier for tech’s brightest minds to work for, partner with, and sell to the military. Back at the Pentagon is a young staffer who toiled for months from a closet-sized office, a twin air mattress stuffed in a box to the left of his desk so he could crash overnight—startup style—to pull together a 120-page blueprint for rebuilding the personnel system. It’s packed with suggestions plucked from the tech industry, including adjusting compensation so that hard-to-hire categories—like, say, computer engineers—will be entitled to merit-based and incentive pay. It calls for setting up an Office of People Analytics, modeled after Google’s data-driven HR outfit known as People Operations. Keep in mind that the Pentagon’s record-keeping system hasn’t changed much since the 1980s. Personnel data is scattered across several software programs that don’t talk to one another. Carter wants to bring in private industry data crunchers to clean it all up and manage a vast new central computer system. “If you go to a Google or a Facebook or a Bank of America, they have teams of data scientists who will go through all this data and predict when this person is most likely to leave—and why we therefore have to do something extra for retention—or what capabilities this person may have that might match up for this particular job,” says Brad Carson, undersecretary for personnel and readiness who is tasked by Carter to help reinvent the Pentagon’s personnel system. Defense, he believes, should have the same—after all, it is the biggest employer in the US.

Mostly, Carter wants more mixing. Take career officers and place them in agile private companies for several-month stints. Expose them to new cultures and ideas they can bring back to the Pentagon. At the same time, invite techies to spend time at Defense. One of the most promising proposals is a fellowship program that Carter refers to internally as BNKR_75. (As in Bunker 1775, the year George

Washington launched the US military.) Following the model set by the US Digital Service—the White House’s strike team of technology experts—Defense would invite individuals to take time out from their private-sector jobs to work on projects at the Pentagon.

Of course, a blueprint does not a building make. Many of the report’s 80 suggestions will need to be approved by Congress. In total, they could cost up to $1 billion a year. It’s not impossible. Congress has backed other reform efforts, like a significant change to the military retirement system. But even if Congress fails to act, Carter’s ambitious attempt is aimed at instigating a cultural shift that will outlast his term. And it will bring in fresh thinking from the private sector.

For now, he can deliver up some initiatives, like BNKR_75, without congressional backing. He has already made use of the US Digital Service team. The week he moved into his office, he requested that a crew make it easier to transfer medical records from Defense to the Department of Veteran’s Affairs so that retirees could have access to them. DJ Patil, who came to the White House from Silicon Valley earlier this year to serve as the nation’s chief data scientist, helped manage the effort. “Carter put that team’s office in his front office, which is almost unheard of,” Patil says. Within two weeks they had completed their task.

Carter’s office is on the third floor of the Pentagon. It’s a massive building. If you were to walk down every corridor, following the ankle-high glow-in-the-dark arrows that were put in place to denote emergency exits after a plane flew into the building on 9/11, you would clock 17 miles. But nobody, except perhaps Carter, would be allowed to do that, because most of the rooms are classified. To get to Carter, you pass through a dedicated entrance, up two flights of stairs, and down a corridor flanked by the portraits of the 23 men and women who run the military. You turn your smartphone all the way off and place it with the others in a wooden case at the door to a room where you will watch CNN until you are escorted down the hall to his majestic quarters.

His biggest Silicon Valley bet to date: a five-year, $170 million effort to build flexible hybrid electronics in San Jose.

He may invite you to join him at his table, which is the same one General Sherman used during the Civil War. But when I visit, we first peruse the photos on his wall. That’s one of the dogs he sent to Afghanistan to sniff out improvised explosive devices in 2010. There he is shaking the hand of former Russian president Boris Yeltsin. He is most proud of the photo that displays 18 gigantic vehicles lined up in the sand of a Kuwait desert. They’re MRAPs, mine-resistant ambush-protected vehicles. In 2007, secretary of defense Robert Gates fought to get these vehicles to troops being decimated by improvised explosive devices in Iraq and Afghanistan, at a cost of $50 billion. Casualty rates for soldiers in MRAPs were 75 percent lower. As Gates’ undersecretary for acquisitions, technology, and logistics starting in 2009, Carter arranged for the all-terrain vehicle version, which could negotiate the rugged Afghan mountainside.

Carter never envisioned being a technologist or a military leader. The youngest of four kids born to a neurologist and a former schoolteacher, he grew up in a suburb of Philadelphia. He routinely underperformed on the wrestling and lacrosse teams but excelled in the classroom. At Yale, he majored in physics and medieval history.

He planned a career in academia, won a Rhodes scholarship, and pursued his doctorate in theoretical physics at Oxford. Over his career he has coauthored 11 books and more than a hundred papers, including one on “time reversal invariance,” the proposition that the world could run backward according to the same laws by which it turns forward. It’s a topic he still loves to discuss at great length. “So quantum electrodynamics only has positive and negative charge, right? You know that,” he says when I ask him about his thesis. Sure, uh-huh. Everyone knows that.

In 1979, mentors who had been part of the Manhattan Project encouraged Carter to take a year off from academia to join a team of scientists at the Congressional Office of Technology Assessment. “They had it in their blood that there was a public responsibility that went with being a technologist, and that was bred into my generation,” Carter says. This set Carter on a career path that would alternate between academia, as part of the Harvard faculty, and the Pentagon, until 2013, when he was said to have been passed over as the president’s pick for SecDef. That’s when he took the post at Stanford.

The job of secretary of defense isn’t easy to keep filled these days. The guy Obama chose, Chuck Hagel, quit in late 2014, citing disagreements with his boss over how to handle the Islamic State. In theory the SecDef oversees a budget of somewhere around $600 billion, but in reality the funding is a moving target, because the federal government hasn’t had a real budget in years thanks to automatic 10 percent annual spending cuts in place since 2012. And to make any significant changes, you need approval from a dysfunctional Congress. “When I was secretary, there was some semblance of a nonpartisan approach, and that has disappeared,” Carter’s mentor, William Perry, who was SecDef under President Clinton, tells me. “That has made the job more difficult.”

The Path to Defense

1965: Ashton Carter gets his first job, at a car wash in Philadelphia. Fired for mouthing off to the owner, he lands a job at the gas station up the street. 1975: As a Yale undergrad, Carter travels to the Fermilab, home of the largest particle accelerator, and writes one of his senior theses on the newly discovered charm quark, a subatomic particle. 1976: Awarded a Rhodes scholarship, Carter takes advantage of the financial backing to pursue his doctorate in theoretical physics at Oxford University. He also patronizes the local pubs. 1980: Carter helps protect the US from Soviet bombs by taking a year off of academia to work at the Congressional Office of Technology Assessment. 1984: During a research fellowship at MIT, Carter writes a report saying that President Reagan’s “Star Wars” initiative can’t protect the US from a Soviet nuclear attack. The president is not impressed, but defense scholars are. 1988: Carter gets tenure at Harvard. 1996: After helping draft legislation to dismantle nuclear weapons left behind in former Soviet territories, Carter rides out of Ukraine with the last of the bombs there. Sunflowers, a Ukrainian cash crop, are planted in their place. By the end of the year, all nukes are removed from the former Soviet territories, either destroyed or transported to Russia. 2009: As the chief weapons buyer under SecDef Robert Gates, Carter leads the development and production of thousands of mine-resistant ambush-­protected all-terrain vehicles, useful for the mountainous Afghan terrain. February 2015: Vice President Biden swears in Carter as the 25th US secretary of defense. April 2015: Carter travels to Silicon Valley, the first SecDef to visit in two decades, to deliver a lecture at Stanford and meet with tech execs.

With his hefty intellect and background of getting things done at the Pentagon, Carter is a strong pick, but his defining leadership skill goes underreported: He’s really good at connecting with people. One morning we visit Walter Reed medical center, where in the physical therapy room an infantryman describes how, on the last day of his fifth tour of duty in Afghanistan, he stepped on an improvised explosive device. It ripped right through him, shredding his body up to his chest. During our visit, he’s wearing red-and-white high-tops and blue socks pulled high over the prosthetics on which he is learning to shoot hoops again. Carter asks after his family and the quality of his care, lingering long enough to make his advance team impatient.

Carter has never fought in combat, but he has experienced the kind of loss that can make a person more empathetic. On the first day of his first nonacademic job, a secretary tracked him down in the lunchroom. “She said, ‘Call your brother,’” Carter remembers. “And I said, ‘Yeah, yeah. I will. I will.’ And she said, ‘Call your brother.’” His parents had been in a car accident. His father was driving and hit a tree. His mother died. A pause stretches between us as he considers this. “And then shortly after, my brother died,” he says. “It’s not like a big sad story, but it means I don’t have much family memory.” Indeed, Perry stood in for Carter’s father at his wedding.

Two and a half years ago, Edward Snowden leaked hundreds of thousands of documents that revealed the extent to which the NSA was intruding on our private lives in the name of security. The NSA, part of the Defense Department, is still reeling from the impact. “The leaks of classified information did very serious damage to our ability to protect ourselves,” Carter says. “They damaged our relations with other countries, and they damaged our businesses.”

Many in Silicon Valley say the government has only itself to blame. Tech companies were blindsided by news that the US was tapping undersea cables to siphon customer data as it traveled to their data centers for storage.1 The information hit many of these businesses’ international operations hard, and the pain is still being felt today.

But it has also become clear that for most companies, the post-Snowden fallout was not as catastrophic as predicted. Research firm Forrester has revised its original estimate for the economic impact of the leaks on overseas business to $47 billion, less than a third of its original reckoning of $180 billion. Only a quarter of the firms Forrester surveyed reported pulling back on spending with US Internet companies. Instead, most foreign customers bolstered their security measures, adding encryption to their data.

Meanwhile, most US Internet companies have struck an uneasy frenemy détente with Defense. Neither side can abandon the relationship, because each has too much at stake. Consider a company like Apple, whose CEO, Tim Cook, was among the executives to meet privately with Carter in Sun Valley. Cook has been an outspoken advocate for encryption. Speaking at a June awards dinner held by a pro-privacy group, he said, “We at Apple reject the idea that our customers should have to make trade-offs between privacy and security.” As for whether Defense should have a master key to unlock data, he said, “If you put a key under the mat for the cops, a burglar can find it too.” Those are fighting words, and yet Defense is an Apple customer. Since 2013 it has purchased more than 200,000 iPhones, iPads, and iPods.

If Snowden’s legacy still colors the Pentagon’s relationships with tech giants, it has less impact on its relationships with startups, most of which would like to figure out how to win Defense dollars. Traditionally this has been an onerous process. For one, a once-plentiful set of military contractors has consolidated over the past two decades. Half the requests for proposals put out by Defense receive only one bid, according to a 2014 study by the Center for Strategic and International Studies. It’s difficult for startups to go through the lengthy process to become a supplier. “The Department of Defense is simply perceived as a bad customer, one that is heavily skewed in favor of larger, traditional players,” reports Jason Tama, a US Coast Guard officer who spent the past year on a Brookings Institution fellowship, interviewing startup founders.

Even if a startup can navigate the complex channels required to become a contractor, some complain that the government still favors traditional players. Consider the rivalry between Elon Musk’s SpaceX and United Launch Alliance, a joint venture put together by Boeing and Lockheed Martin to send military and spy satellites into space. It took Defense two years to complete the certification process for SpaceX; in that time, the Air Force awarded ULA a contract for 28 launches, prompting Musk to sue. SpaceX and the DOD settled in January, and the Air Force has certified SpaceX’s Falcon 9 rocket to launch military and spy satellites.

Carter vows to make procurement easier. Take cloud services, which the military needs for everything from the mundane—storing all that personnel data—to the supersecret, like storing video footage coming in off a reconnaissance drone that may carry a dozen high tech cameras. Earlier this year, the government launched a more user-friendly website, and enterprise software companies like Box report the process now appears more straightforward. Carter plans to keep that momentum going by shortening the time it takes for vendors to get approval. “The key is to contract quickly—to not make these people fill out reams of paperwork,” he says. He also expects his new West Coast office will work aggressively to identify potential suppliers.

On the last Friday in August, just at the start of an Indian summer that will persist well into the fall, Carter returns to Mountain View to unveil his biggest Silicon Valley bet to date: a five-year, $170 million effort to build flexible hybrid electronics in San Jose. Speaking from a makeshift stage inside a wind tunnel on Moffett Airfield, Carter says the Defense Department will contribute $75 million to the public-private partnership, which will be run by an industry group, the FlexTech Alliance. It will dole out research funds to academics and startups to move their inventions from the lab to industry more quickly.

Flexible electronics join ultrathin silicon bits to stretchable materials, freeing them from the stiff circuit boards and chipsets that have always contained them. The result is computers that bend. Properly developed, they could have a significant impact for Defense as well as for the 96 companies (Apple and Lockheed Martin, among others) and 11 labs and universities that will contribute. Imagine a thin tablet computer that could wrap like a sleeve around a soldier’s arm, replacing the awkward, heavy hardware now used for navigation and communication and substantially lightening a soldier’s backpack, which can weigh more than 70 pounds. Or new types of robots that are lighter and less likely to break. Or strips of sensors that can better monitor the structural health of large and expensive military equipment (like the Doomsday Plane). For private industry, imagine a wearable medical device infused into a piece of clothing, or lightweight sensors that embed into the fiber of our bridges to help monitor their integrity.

Carter keeps his remarks brief so he can motor across Moffett to visit the newly launched Defense Innovation Unit Experimental. Just as he did during his April visit, he has organized a roundtable discussion. Andreessen, back from paternity leave, attends. So do the CEOs of Theranos and Liquid Robotics and the president of SpaceX, among others. This time, however, the military hosts. DIUx director George Duchak, a Darpa alum, has just finished his third week on the job.

DIUx doesn’t fit naturally into the military’s hierarchy. It is not meant to replace Darpa, but the two will likely work closely together. Nor will it try to replace In-Q-Tel, a nonprofit VC outfit the CIA started in 1999, though here, too, there may be room for partnership. Rather, think of it as a scouting office. Duchak and his team will visit startups, recruit engineers, provide desks for reservists to work on projects, and check in with Carter frequently.

Carter hopes that reducing bureaucracy and investing in research this way will have lasting impact beyond his term. But it’s clear that much of the progress he has been able to realize is due to his particular skill set. It’s about his ability to describe how flexible hybrid electronics work and his conviction that they must be built in San Jose, the relationships to tech execs he began cultivating long before he took the top post, and his faith that tech’s brightest minds are also patriotic, driven by a sense of purpose and service that can, with the right approach, be unleashed. “They are inventing new technology, creating prosperity, connectivity, and freedom,” Carter says of the moguls he met in Sun Valley. “They feel they too are public servants, and they’d like to have somebody in Washington they can connect to.”

Whether patriotism compels them or they simply see new business opportunities in their relationship with Defense, many tech execs have his back. I ask Horowitz what he thinks will happen after Carter leaves office. “Secretaries of defense tend to go across administrations when they’re really good,” he says. He’s referring to the only person who has ever done this, Robert Gates. “I’m really hoping that’ll be the case here.”

More likely, a new administration will bring in a fresh SecDef for tech to get to know all over again. Carter is racing the clock, attempting to seed a new image for Defense before time’s up. And so he ducks out of the roundtable and walks briskly to his waiting motorcade, which rolls past Google engineers pedaling their beach cruisers through the Mountain View streets and heads over to the corporate offices of Linked-In. It’s late afternoon, but for Carter, the day is still young.

1 UPDATE 11/19/2015 3 PM PST: This story has been updated to more accurately describe the mechanism by which the federal government was accessing the customer data of Silicon Valley companies.

Grooming by Janis Heffron