For a story largely set in the endless expanse of outer space, “First Man” sure is one claustrophobic movie.

Even when Damien Chazelle’s Neil Armstrong biopic leaves Earth, the camera mostly keeps to the cockpit, rarely venturing more than a few feet from Armstrong’s vantage point — controls, lights, a tiny window often showing nothing. When the camera does leave the ship, it keeps a tight shot instead of giving us a full view of the craft.

When things go wrong, the inside of the cabin becomes a screaming nightmare — beeping lights, blaring alarms and sweating faces, all shot and cut into a swirling abstraction.

As a filmmaking device, it’s terrifying. And exhausting. And perfectly in tune with what “First Man” is about.

This is not a movie concerned with the wonders of space travel, but instead the constant, brutal grind of it. A movie about the experience of being locked in a tin can, strapped to a bomb and shot out into a cold, black void that will do everything in its power to kill you. It’s about what kind of man is willing to do that and why.

“First Man” is, without question, a technical marvel (and a clear Oscar contender for best direction, actor, supporting actress, adapted screenplay, cinematography, editing, score, special effects, production design and sound editing and mixing). But the film is also, without question, a bruising watch — a procession of physical and emotional trauma on the way to its otherworldly catharsis.

It was a long, hard road to Armstrong’s famous small step. This movie wants you to feel every mile of it. It succeeds. And now I’m very tired.

“First Man” takes place from 1961 to 1969 and focuses on Armstrong’s days in the Gemini space program leading up to the Apollo 11 moon landing.

Chazelle recruited his “La La Land” star Ryan Gosling to play history’s most famous astronaut, and it’s yet another amazing performance from one of Hollywood’s best actors. Gosling’s Armstrong projects a calm, competent exterior, but one marred by a few cracks he can’t quite hide. We catch glimpses of the grief, doubt and fear roiling beneath the surface.

Just as good is Claire Foy as Janet Armstrong, Neil’s wife. Such movie parts are typically a thankless task. But Foy’s portrayal is calibrated in a much angrier key than the usual wife-of-a-great-man role, and she is, thus, much more interesting. Janet is not just worried about her husband; she’s mad as hell at him (and NASA) for the nightmare he’s putting her through.

“First Man” begins at the bleakest moment of the Armstrongs’ lives: the death of their young daughter, Karen. Neil is distraught not only at her loss, but also that he couldn’t solve the problem of his daughter’s illness. He thrusts himself back into work in search of solvable problems, igniting a decadelong obsession that will take him further than any man in history.

The screenplay — adapted from James R. Hansen’s Armstrong bio by Oscar-winning “Spotlight” scribe Josh Singer — takes a nuts-and-bolts approach to the story, focusing on the specifics of the triumphs and tragedies that helped get us to the moon.

Armstrong’s fellow astronauts and commanders are well played by a string of familiar faces, including Jason Clarke, Kyle Chandler and Shea Whigham. Corey Stoll and Lukas Haas play Armstrong’s Apollo 11 team members Buzz Aldrin and Michael Collins, respectively.

If you’re familiar with the highlights of American history, you might have a bit of an idea how the movie ends. (By the way, they do show the American flag on the moon in the movie and in many other scenes, just not the planting of the flag, much to the chagrin of certain media outlets and former U.S. senators.) But unless you were alive at the time, you’re likely less familiar with all the setbacks, accidents and deaths of the Gemini and Apollo missions. All the sacrifices that made mankind’s giant leap possible.

Armstrong’s walk on the moon is perhaps tempered with a note of ambiguity. (Was it all worth it?) Joy and pride play across Gosling’s face in the scene, but also grief. Up to this point, Armstrong has kept his eye on the prize and shut himself down completely. He’s shoved aside the pain of losing his little girl and then so many of his best friends.

But after two hours of the utmost professionalism and emotional restraint, Armstrong and the film achieve emotional liftoff, building to a moment that’s basically the cinematic equivalent of getting hit in the stomach with a bat. You’ll know the part I’m talking about because you’ll feel like you’ve been hit in the stomach with a bat.

At that moment, “First Man” manages to do something miraculous: It makes the most-viewed event in human history feel new again.