An estimated 530 million people around the world had their eyes on NASA astronaut Neil Armstrong as he took one "giant leap for mankind" on July 20, 1969.

Armstrong cemented his role in history that day, becoming the first person to step foot on the Moon. Today, walking on the lunar surface is an honour only 11 other men share.

But the backstory of how Armstrong was selected for that job and his tumultuous path to the Moon are less well known.

In the movie First Man, actor Ryan Gosling plays a young Armstrong in the ambitious and sometimes tragic lead-up to his unlikely journey to the Moon.

The film is based on the non-fiction book First Man, which was published by Armstrong's official biographer James Hansen 13 years ago.

Nearly everything chronicled in the film is true (aside from the Hollywood makeup, perhaps), including Armstrong's near-death experience training to fly the Moon lander and the death of a good friend who was chosen for the first Apollo mission.

Screenwriter Josh Singer spent four years researching and writing the movie, which already has some critics and fans buzzing about potential Oscar nominations.

"I was just knocked out by how much we don't know about Neil Armstrong," Singer recently told Business Insider.

Here are 22 true facts about Armstrong's life and the space race that the movie First Man recounts:

As the movie properly points out, Russian cosmonauts were ahead of the US at nearly every turn in the Cold War space race — until the Moon landing.

The Russians launched Sputnik, the first satellite, in 1957. Then they sent dogs Belka and Strelka into space in 1960, and hit the Moon first with its Luna probes.

The nation was also the first to put people in space: Yuri Gagarin in 1961 and Valentina Tereshkova in 1963. Alexei Lenov did the first spacewalk in 1965.

Clearly, the US was lagging behind.

Neil Armstrong worked as a test pilot at NASA for years before he went to the Moon. He was the first civilian astronaut in space.

The class of X-15 test pilots that came before Armstrong were all active-duty members of the military. Many served in the Air Force or the Navy. Armstrong was in NASA's second class.

Armstrong was no stranger to tragedy. His daughter died at age two from a case of pneumonia while suffering from a malignant brain tumour.

Armstrong was grieving and wanted to "invest [his] energies in something very positive," his sister June told Hansen. "That's when he started into the space program."

Not everyone was as excited about exploring space as Armstrong. Many Americans at the time thought the $US24.5 billion price tag of the Apollo missions was too high. Gil Scott-Heron even wrote a song about it, called "Whitey On The Moon."

"Was all that money I made las' year, for Whitey on the Moon?" Scott-Heron's song asked. "How come there ain't no money here? Hm! Whitey's on the Moon."

Some people protested NASA's 8-year effort to get to the Moon.

Before going to the Moon, Armstrong participated in the Gemini 8 flight. It was the first mission that docked one spacecraft into another in orbit — an essential pre-requisite for a successful Moon landing. 

But it led Armstrong into a scary scrape with death, which is portrayed in the film.

When a thruster malfunctioned, Armstrong and his co-pilot David Scott started spinning. The two were almost lost in space, rotating at a mind-scrambling rate of one revolution per second.

"We have serious problems here. We're, we're tumbling end over end up here," the crew was recorded saying.

The two managed to regain control of the spaceship by powering up thrusters on the nose of the capsule. They landed in the Pacific just shy of 11 hours after takeoff.

FirstManFacts2(NASA)

That cut the planned three-day mission short. Armstrong and Scott were jostled, but alive.

A year later, in 1967, the first Apollo mission ended in tragedy. A fire erupted on the launch pad during a pre-launch test, killing all three astronauts in the rocket.

Ed White (centre in the image below) was Armstrong's neighbour.

FirstManFacts1(NASA)

Armstrong had yet another near-fatal day just over a year before he went to the Moon.

As he was flying a lunar lander in Houston, propellant started leaking out of the vehicle, rendering his controls useless. Armstrong had to quickly escape while 200 feet off the ground.

A NASA investigation later showed that the lander's alert system didn't properly warn Armstrong that the vehicle was losing pressure.

Luckily, NASA got the rickety machine spiffed up before Armstrong went to the Moon.

He successfully tried the machine again in June 1969, a month before blastoff.

Armstrong also practiced Moon moves on the ground, a less risky endeavour.

He prepped for every step of the journey, even plotting how he'd mount and dismount the ladder on the Moon.

Finally, the fateful day arrived. On July 16, 1969 at 9:32 a.m. ET, Armstrong and his crew set off on their eight-day mission to the Moon.

The accommodations inside the ship were not five-star. With no restroom on board, the astronauts peed in bags.

FirstManFacts5(NASA)

Four days later, the astronauts used a lunar lander called the Eagle to make their final descent onto the lunar surface.

There were three men on the mission, but only two of them boarded the Moon lander.

It was not a smooth ride — Armstrong later said flying the lander was the hardest part of the mission, but that it also gave him a "feeling of elation."

Mission control waited with bated breath until Armstrong announced, "the Eagle has landed."

On the ground in Houston, capsule communicator Charlie Duke let out a sigh of relief.

"You got a bunch of guys about to turn blue," he told Armstrong. "We're breathing again."

After all that, the Moon walk was a safe, predictable task for Armstrong.

The Moon's surface was "fine and powdery," he said. "I can pick it up loosely with my toe."

FirstManFacts3(NASA)

Armstrong didn't take all the credit for the Moon-walking accomplishment.

"When you have hundreds of thousands of people all doing their job a little better than they have to, you get an improvement in performance," he later said. "And that's the only reason we could have pulled this whole thing off."

Once back on Earth, the astronauts didn't get to reunite with their families right away.

All three had to stay in quarantine for 21 days in case they'd brought home any lunar contagions.

Neil chatted with his son Mark over an intercom.

FirstManFacts4(NASA)

Armstrong even celebrated his 39th birthday in confinement on August 5, 1969.

Finally, on August 11, the crew was declared disease-free and allowed to go outside.

So if the movie "First Man" makes it seem like a flag or chalky footprint on the Moon were only a small part of the tale, that's because it really happened that way for Armstrong.

"Neil was extremely humble, as were many of these astronauts," Ryan Gosling said when the film was released at the Venice Film Festival.

As Armstrong himself once put it, "I am, and ever will be, a white-socks, pocket-protector, nerdy engineer."

This article was originally published by Business Insider.

More from Business Insider: