The old-school ad­ven­ture epic is something of an endangered species. We no longer see explorers on the big screen, venturing into uncharted terrain where foreign dangers lurk, even though those stories are cinematic.

“The Lost City of Z,” which dramatizes Percy Fawcett’s adventures in South America, is a thrilling reminder of the genre’s potential. The real-life British soldier made multiple trips to the Amazon during the early 20th century in search of an ancient civilization.

Viewers should know going in that the movie, based on a book by David Grann, plays fast and loose with the facts. The film depicts Fawcett, played by Charlie Hunnam, as a brave, brilliant and open-minded pioneer, chafing against the strictures of a British society that labels the indigenous people “savages.” In truth, Fawcett probably did the same. But that would have been a non-starter for a hero in 2017.

The careful attention to modern-day sensibilities comes across even more conspicuously in the depiction of Percy’s wife, Nina (Sienna Miller), a self-professed “independent woman,” who makes a case for accompanying her husband on his dangerous trips. Instead, the mother of three ends up stuck at home while her husband gallivants on the other side of the world.

Robert Pattinson, left, and Charlie Hunnam star in “The Lost City of Z,” the real(-ish) story of one of Britain’s greatest explorers, who trekked deep into the interior of Brazil. (Aidan Monaghan/Amazon Studios & Bleecker Street)

Fawcett’s first trip is a mission he’s loathe to accept on behalf of the Royal Geographical Society to help define the border between Brazil and Bolivia. Often overlooked because, as one character puts it, he was “unfortunate in his choice of ancestors,” Fawcett agrees to go after he’s promised glory and advancement should he succeed.

Once he realizes how dangerous the mission is, however, he begins to second-guess that choice. Along with his aide-de-camp, Henry Costin (a wonderful Robert Pattinson, unrecognizable under a bushy beard), a native guide (Pedro Coello) and a few other helpers, Fawcett learns just how risky a river cruise down the Amazon can be. In one particularly harrowing scene, a tribe unleashes an onslaught of arrows on the travelers. Those who survive nearly starve to death, although blood poisoning from gangrenous wounds or disease could easily kill them first.

Sienna Miller stars as Nina Fawcett. (Aidan Monaghan/Amazon Studios & Bleecker Street)

At the culmination of this trip, Fawcett stumbles upon pottery in the jungle, not to mention ancient art carved into rock. He isn’t quite sure what this place is, but he knows he must return to investigate. But how to convince the Royal Geographical Society to send him back, when its members don’t want to acknowledge that such a civilization could predate England’s?

“The Lost City of Z” was directed by James Gray, who capably transitions from smaller, more self-contained stories — “Two Lovers,” “We Own the Night” — to this sprawling saga that whisks audiences from Cork, Ireland, to the rain forest to the trenches of World War I France. The movie is long, but never slow, even as it leaves ample time to survey the breathtaking vistas captured by cinematographer Darius Khondji.

Hunnam competently inhabits his role, even if his character isn’t entirely memorable. In an effort to make Fawcett a logical, upstanding guy, the story never fully convinces us of his obsession with returning to find the lost city. The man on the screen, devoid of either madness or extreme passion, doesn’t seem the type to leave his family and return to a place that nearly killed him.

But off he goes anyway back to the great unknown. The choice might be hard to fathom, but it’s still a thrill to watch.

PG-13. At area theaters. Contains violence, disturbing images, brief strong language and some nudity. 141 minutes.