Henry Jackman’s music for “The Gray Man,” the spy thriller debuting Friday on Netflix, is as cutting-edge and exciting as any score you’ll hear all year. Yet he wrote all of the film’s key musical elements without ever seeing a frame of film.

It’s what happens when real life collides with a movie career.

Jackman, the London-born, L.A.-based composer of the last three movies by “Gray Man” directors Joe and Anthony Russo (including two “Captain America” films and “Cherry”), became a father for the first time in March 2021. He planned to take nine months off work in order, he says, “to be the perfect dad.”

The Russos had alerted him before they started shooting their $200-million action film in which Ryan Gosling plays a CIA agent (nicknamed “Six”) targeted by an insane ex-colleague played by Chris Evans. But they weren’t going to need him to begin writing before December 2021, when editing would be well under way.

“We had a discussion about Six’s internal trauma, and how he’s got a bit of a ‘ghost in the machine’ issue that won’t go away,” Jackman tells Variety. “I thought, well, I can’t just sit here dealing with my son peeing on me and screaming all day long, so I’ll quickly knock out this piano idea.”

So in his non-dad hours, Jackman went into his home studio and began putting down musical ideas. “I used a reverse reverb effect and fiddled around a bit,” he says, until he had a two-minute piano-with-effects demo that might be useful for emotional scenes.

That piece opens the 17-minute “Gray Man” suite on the soundtrack album, the creation of which occupied those nine months of “time off” and now serves as an overture of all of the film’s themes.

Jackman read the script and couldn’t stop adding material to that opening theme. He came up with an offbeat percussion sound, invoked the classic “Mission: Impossible” 5/4 rhythm, and “went on this massive mission designing percussion sounds.” The highly produced music incorporates tick-tock figures, eerie noise and minor chords that are “very espionage,” he says.

“I chipped away at this piece a bit like (producer) Trevor Horn used to chip away at an Art of Noise album for months and months. It almost became an artistic endeavor in itself. At no point was I even thinking about Joe or Anthony (although) every now and then I would think, I really ought to play just a couple of bars of this for them.”

But he didn’t. “Every week this suite got longer and longer. I started messing around with some jazzy chords, a new idea in the brass,” he says, citing David Shire’s classic “The Taking of Pelham 1-2-3” score, “like an atonal kind of jazz” that became the signature for Hansen, the sadistic psychopath who pursues Six across the globe.

Eventually he added a driving bass line and a series of “big, Mancini-esque long brass statements,” referring to Henry Mancini, whose ’50s and ’60s scores included such detective and caper films as “Peter Gunn,” “Charade” and the “Pink Panther” series.

Nine months later, as the Russos were editing, Jackman finally sent his 17-minute masterpiece to his directors. “I didn’t really want to play it. I just wanted to hide,” he admits, apologizing in case they felt it wasn’t appropriate for the film. Luckily, Joe Russo loved it, texting Jackman with live reactions as he played it through for the first time.

With the approval of the Russos, Jackman went to work on scene-specific music. But most of the key compositional work was done. “Almost all the content, a huge proportion of cues in the score, have its origin somewhere in the suite,” he notes.

In April 2022, he flew to London to record the orchestral parts of the score, with an 80-piece ensemble, mostly strings and brass (recorded separately because of COVID restrictions). But a large part of the score was already recorded. “I spent ages in engineering mode,” Jackman says. “I really enjoy taking sounds and shoving them through late ’70s analog equipment, overdriving and distorting them. Almost all the percussion is heavily hand-made.”

He thinks this unusual process – writing not to the picture, but rather away from it – benefited the film. “If you’ve got the detail of each scene, you’re going to get distracted into the mechanics of the cue. Whereas if you want to come up with something original and interesting, explore your ideas and pursue them to find their own internal logic.

“You put all of that in the melting pot and keep stirring. Hopefully something pops out that you haven’t quite heard before.”

VIP+ Analysis: Why Netflix Must Ace Its ‘Gray Man’ Test