Elon Musk’s company SpaceX and Jeff Bezos’s Blue Origins have grabbed the headlines in the space race, both of them building rockets and spacecraft. But there is fascinating backstory on how this race and the private space industry came into existence. It is the tale of a renegade entrepreneur, Peter Diamandis, who founded the XPRIZE foundation to incentivize the building of rockets in order to find a way into space himself.

Journalist Julian Guthrie’s brand new book, How to Make A Spaceship: A Band of Renegades, An Epic Race, and the Birth of Private Spaceflight (Penguin Sept. 20, 2016), tells that story. It reads like a thriller, and it reveals many secrets.

In 2011, Diamandis recruited me to be head of academics at a futuristic think tank, Singularity University, that he and Ray Kurzweil had founded. I am in awe of him and have a bias. Nonetheless, I have no doubt that the lessons in the book will resonate with today’s entrepreneurs, engineers, and adventurers, because they illustrate how the impossible can be made possible.

As Guthrie narrates the story, and as I have heard from Peter Diamandis on several occasions, it all started with Apollo 11’s landing on the Moon, in July, 1969. Watching this, Diamandis became determined to fly into space himself and organized his life around that dream. He completed two degrees from MIT and a medical degree from Harvard — not so he could practice medicine, but to enhance his chances of getting into the Astronaut Corps. Then he founded a national student space club that Jeff Bezos was chapter head of at Princeton; an international space university; and a rocket company. When NASA began to wind down manned space flight, Diamandis realized the government wouldn’t get him where he wanted to go and he would have to do it on his own.

He found his inspiration for a modern-day space race in an unlikely place: During the golden age of aviation, French hotelier Raymond Orteig offered a $25,000 prize to the first person to fly non-stop between New York and Paris. Several unsuccessful attempts were made before an American airmail pilot named Charles Lindbergh won the competition in 1927 with his plane, the Spirit of St. Louis, galvanizing creation of the commercial airline industry. Nine teams competed for the $25,000.  Between them, they spent around $400,000 — 16 times the value of the cash prize. Diamandis marveled: “Orteig didn’t spend one cent backing the losers. By using incentives, he automatically backed the winner … great return on his money”.

In May 1996, Diamandis launched a $10 million prize for the first non-governmental team to build and fly a manned rocket to space twice within two weeks. When he announced the prize, tentatively titled the XPRIZE, he didn’t have the money. He did what entrepreneurs do — made a big promise with the hope all would work out. It took him years to raise the money, and it came from the most unlikely of sources: an Iranian woman, Anousheh Ansari, who had just sold her company and shared his dream of going into space.

When the XPRIZE was announced, only the world’s largest three governments — those of the U.S., Russia, and China — had launched people into space. The XPRIZE soon had 24 teams from more than a dozen countries competing. Across the globe, engineering students scraped together money and resources to try to build a manned space program. Space scientists ignored ribbing from colleagues who said the dream of private space was impossible. Retirees, working in rice fields in Texas, built engines and rockets. A famous programmer named John Carmack (now CTO of Oculus Rift) decided to try to do for aerospace what he had done for video games.

And in the Mojave Desert, an airplane designer named Burt Rutan, who had secretly attracted funding from a billionaire — Microsoft cofounder Paul Allen — began his covert space program. He had fewer than 30 engineers working on the spaceship. As with breakthroughs that came later with the Internet, personal computers, and smartphones, wherein failures were expected and iterations were the norm, Rutan began by throwing foam models off the Mojave tower, created on the basis of doodles on a napkin. With every new type of plane, Burt plotted and planned and worked out hundreds of details in his mind before testing anything in a computer. There was never an epiphany, a single “aha” moment; only iteration after iteration, layer after layer. How these foam models led to the world’s first private spaceship, SpaceShipOne, is one of the great entrepreneurial adventure stories of our time.

Rutan won the $10 million XPRIZE in 2004. Richard Branson bought the rights to the technology and is developing SpaceShipTwo to fly paying passengers to the edge of space. Elon Musk, who met Diamandis in the spring of 2001 and was inspired by the XPRIZE, has hit one milestone after another and hopes to take NASA astronauts to space beginning next year. Bezos, who met with Diamandis in the early days of the XPRIZE, is also making history with his own suborbital spacecraft.

The story sounds incredible — from the pages of science fiction. And it has a happy ending. But as all entrepreneurial ventures go, nothing went according to plan: It was riddled with failure and disappointment, ugly battles broke out between friends and founders, the world often looked like it was coming to an end, and Diamandis had to gamble everything he had.

Most interesting is an observation Branson makes in the book’s foreword: There isn’t much of a difference between being an adventurer and an entrepreneur. As an entrepreneur, you push the limits and try to protect the downside. As an adventurer, you push the limits, and protect the downside — which can be your life.

Vivek Wadhwa is Distinguished Fellow and professor at Carnegie Mellon University Engineering at Silicon Valley and a director of research at Center for Entrepreneurship and Research Commercialization at Duke. His past appointments include Stanford Law School, the University of California, Berkeley, Harvard Law School, and Emory University. Follow @wadhwa.

Get more stories like this on TwitterFacebook