Utilizing a $90 million budget, 500 extras, two relatively unknown actors, three stars (in bit parts) and one extremely long continuous shot, the director depicted a harrowing tale of the trenches during World War I that unfolds in real time.

Back when Sam Mendes was a boy in the U.K., he would sometimes visit his grandfather at his home in Trinidad. Sitting on a porch with some of his cousins, Mendes would listen as the old man spun harrowing tales of his time in the trenches during World War I. "His stories were pretty anti-romantic and unsentimental," recalls Mendes, now 54. "There was no heroism or bravery. They were all stories about luck and chance."

After marinating in the Oscar-winning filmmaker's imagination for 40-some years, those stories are now the basis of Mendes' latest film, 1917, a $90 million World War I movie that Universal opens on Christmas Day. Its plot is simplicity itself: Two British soldiers — played by relative newcomers George MacKay and Dean-Charles Chapman — are sent on a suicide mission to warn a fellow battalion of an impending German ambush. But there's a high-concept twist: The soldiers only have hours to save their comrades — navigating snipers, trip wires, land mines and even flesh-eating rodents — with the action unfolding in real time, as if in one long, continuous shot.

"I had this thought, 'Why don't we lock the audience into the men's experiences in a way that feels completely unbroken, in a movie that resembles a ticking-clock thriller in which we experience every second passing in real time?' " Mendes says. "It seemed like a natural way of telling the story. Albeit difficult."

The first pages of 1917 were written in 2017 at Mendes' home in London between diaper changes and bottle feedings. Mendes' wife, classical trumpet player Alison Balsom, had just given birth to their daughter Phoebe, while he had given birth to Spectre, his second James Bond movie, just two years earlier.

"I didn't want to leave the house because those are the precious weeks and months," he says. "So I thought I'd occupy myself by reading and writing." By February 2018, he'd done enough reading and writing to produce 20 rough pages that included the bones of a real-time World War I movie, but not much else. He realized he needed help and enlisted Krysty Wilson-Cairns, a Scottish writer with whom he'd collaborated on Penny Dreadful, the TV series he'd produced for Showtime.

"When Sam told me it was all going to be one shot, which was our very first call, I went and looked for [war] films that were one shot or scripts that were one shot," says Wilson-Cairns. "I couldn't actually find any. I couldn't find a precedent, so we had to invent this structure and this narrative as we were going along. It's a hero's journey, but it doesn't really adhere to any of those traditional beats."

Wilson-Cairns spent weeks digging around in the Imperial War Museum in London, reading letters and diaries that had been written in the trenches. She toured northern France, where the film takes place, visited cemeteries where thousands of soldiers were buried and studied 1929's All Quiet on the Western Front, the definitive World War I novel. By April 2018, she had knocked out a first draft of the script, four weeks after Mendes had handed her his pages. "Someone asked me the other day if I was aware that I was the first woman to write a big war movie," she says. "I guess there's an archaic notion that war movies are men's stories."

For Mendes, choosing a woman to co-write a script with virtually no female characters — except for a brief scene with a woman and a baby — was a no-brainer. "I didn't want to be in an echo chamber," he says. "I didn't want another middle-aged white man with the same view of the world as me." Indeed, Mendes all but credits Wilson-Cairns with saving the project. "Without her, it would still be a file on my laptop titled Unfinished WWI Project," he says. "There's a lot of those unfinished projects on my laptop."

In casting the two soldiers at the heart of the film, Mendes decided to avoid movie stars. "I wanted to be surprised," he says. "There's a whole generation of fantastic young actors." Casting director Nina Gold saw hundreds of them, sending scores of videotaped auditions to Mendes and his longtime producing partner, Pippa Harris, to examine. Harris was familiar with MacKay's work, having chaired the BAFTA jury in 2014 when he was a nominee for rising star. But neither MacKay nor Mendes had any idea who Chapman was, despite his three-season stint as Tommen Baratheon on Game of Thrones. Neither of them had ever watched an episode of the HBO series.

When the actors were called back to audition together in front of Mendes, they were given only four or five pages of the top-secret script. It did not feel to them like a slam dunk. "We both left that audition kind of going, 'I really can't tell, I really don't know,' " remembers MacKay.

In an unusual cinematic role reversal, some of the smaller parts were given to the biggest stars. Colin Firth, Benedict Cumberbatch and Richard Madden perform brief bits as officers. But the most challenging roles to cast were the extras, about 500 of them, who play a vital visual part. "They were all picked by Sam," says Harris. "He looked at the tapes for all of them because he wanted to know that they were not only going to look right but be able to move in the right way. They all had to walk in and say something on tape, then he picked them. It took quite a while."

MacKay and Chapman rehearsed for a week in November 2018 and then "sort of went away and did our own homework in December," as MacKay notes. In January, they returned for a grueling three-plus months of more rehearsals and arms training. The time paid off.

"You were setting the pace of the film, quite literally," says MacKay. "So if you're not doing the lines in the way you should be, at the right pace, walking at the right pace, not considering what you're walking through, the set will be the wrong size. You need to get to the corner at a certain point, and if you race through the scene, you finish the scene way before the corner, and then the whole set is compromised."

Adds Chapman: "It was hard to play Blake, I'm not going to lie. Everything was heavy. So just to be able to hold up the weapon and aim at the same time without making your arm shake is a big deal. I remember the first time holding the rifle, God, it nearly dropped me to the floor. And the amount of takes we did, one after the other. There was no break."

Although the film isn't actually a single, continuous shot — it's a series of long scenes sewn seamlessly together by editor Lee Smith (with a major assist from VFX artists at MPC Film) — every step had to be perfectly choreographed to make it look like it was, which added another layer of complexity and precision. One sneeze or yawn could ruin a whole day's work. "Some of those scenes were eight or nine minutes long, and there was not going to be the option of cutting away," says Harris. "So the actors really had to know their stuff and remember all the dialogue and the moves."

By April, Mendes was ready to start the 65-day shoot, much of it on an old military base in Salisbury, England, where trenches were dug. Harris considered housing the cast and crew there. "I thought, 'I bet we could rent these barracks cheaply,' and [DP] Roger Deakins said, 'I'd be up for that. I wouldn't mind sleeping in one of these,' but of course as we got closer to the actual shoot, I thought, 'There's no way I'm going to ask any of the crew to sleep in barracks,' " she says.

Weather turned out to be somewhat of an issue — unexpectedly for England, it was too sunny at times. "Some days we just rehearsed and other days we just waited for a long, long time until the clouds came over," says Deakins. "We needed clouds for the look of the film. I wasn't lighting anything, and I didn't want to shoot in sunlight. It just wouldn't have looked right. Also in terms of matching from one location to another, one shot to another, we needed an even kind of transition, so we needed to shoot in clouds."

Exactly how Mendes and Smith sewed together all those eight- and nine-minute scenes into one continuous-seeming shot remains a mystery — one Mendes isn't eager to unravel. "I don't want people scrutinizing it while they're watching the first time," he says. "There's a danger when you talk about a movie so much before release that people go in looking at the camera work, looking at the stitches. The reason for not revealing that stuff is not because I'm coy but because I don't want people thinking about it." Deakins also remains mum. "You'd be surprised," he says. "Sometimes you think, 'Oh, that must be a cut there,' but it wasn't."

However they did it, the one-shot conceit made editing the movie a harrowing adventure of its own. "On a traditional film, you can manipulate and juxtapose scenes and trim things and make changes," says Smith, who worked with Mendes on Spectre. "This film, you had to be very confident that you picked the right take so the next take could line up, which is also nerve-racking because if you're wrong and you want to swap it out later or do what you normally would do, it has a domino effect." The single-shot concept also was a challenge for Thomas Newman, who scored the picture. "It affects your choices because moments of transition are never corresponding to cuts," Newman explains.

True to its ticking-clock thriller style, Mendes finished the film just six days before its first public screening Nov. 23 at the DGA in New York. By the time the end credits rolled, the Oscar race had been transformed, with Mendes suddenly a shoo-in for Oscar nominations (he won best director in 2000 for American Beauty, one of five statuettes for the film, including best picture).

But even if Mendes does take home another directing Oscar, it might still be a while before he reveals the secret of his one-shot cinematic illusion. Maybe some day when he has grandchildren of his own, he'll tell them stories about it while sitting on a porch in the Caribbean. "I will reveal it at one point," he promises. "I just don't know when."

This story first appeared in the Dec. 19 issue of The Hollywood Reporter magazine. To receive the magazine, click here to subscribe.