When Michael Noer was a young boy growing up in Denmark, near the German border, he’d sneak out of bed at night and peek around the sofa to catch glimpses of movies dubbed in German that his mother was watching. One of these was the 1973 classic “Papillon,” starring Steve McQueen and Dustin Hoffman. Now a 39-year-old director, Noer is bringing that film’s story back to the big screen.

In the new “Papillon,” in theaters Friday, the safecracker Henri Charrière (Charlie Hunnam) is falsely accused of murder and sentenced to the notorious penal colony of Devil’s Island in French Guiana. There, he bonds with the wealthy counterfeiter Louis Dega (Rami Malek), and the two attempt to escape the torturous prison. The film’s title is the French word for “butterfly”— Charrière’s nickname because of the tattoo of one on his chest.

While the movie is based in part on the original film — which starred the late McQueen as Papi and Hoffman as Dega — both derive from Charrière’s best-selling autobiographical novel, also titled “Papillon.” The 2018 flick also includes facets of Charrière’s second book, “Banco.”

That’s why Noer doesn’t consider the film a remake, but rather a second adaptation.

“I truly just looked at it as if I was offered a huge opportunity to do a great theater play of something like ‘Hamlet,’ ” Noer tells The Post.

In preparing for his version, the director watched the first film just once.

“I felt it was a little like if you sneak into your girlfriend’s diary and read about former boyfriends,” he says. “It’s part of who she is, but you should really just keep your nose out of stuff like that because it’s going to eat you from the inside.”

The resulting movie follows the plot of the 1973 original, but with many elements changed along the way. For starters, Noer’s flick opens with Charrière’s colorful life in Paris, rather than his departure from France, along with the other convicts. A major supporting character from the original, Papillon’s friendly prison pal Clusiot (Woodrow Parfrey), has also been replaced with a more dangerous prisoner named Celier (Roland Møller).

Noer, who has a background in documentaries, also doubled down on gritty authenticity, featuring on-screen details such as a metallic cylinder that Dega uses to hide money inside his rectum.

Hunnam also dedicated himself to making things look as real as possible, going a bit Method for the scenes in which his character spends years in solitary confinement. After dropping 35 pounds, he spent about a week — day and night — in the Belgrade, Serbia, prison cell they used as a shooting location.

“I slept there in a camper outside because I felt so bad about going back to a hotel,” says Noer.

Ultimately, Noer says the biggest difference between the two movies is that the new adaptation intensifies the characters’ friendship into “120 percent a love story” — something he hopes young audiences will latch onto.

“Charlie and I … had this dream about two kids watching the film,” says Noer, “and as they’re walking out of the cinema, they’re clapping each other on the back and saying, ‘Well, if you ever go to prison, I’ll be your friend!’ ”