Joined by the other members of his jazz trio - bassist David Bowden and drummer Stephen Henderson - Fergus travelled to New York, where he found himself attending a NBA game featuring the director's beloved New York Knicks.
He also managed to persuade Lee, who won an Oscar for best adapted screenplay in 2019, to pose with a scarf of Glasgow football team Queen's Park.
Once in the studio, it was a case of playing through Stony Gate, with Lee showing the musicians the scene the track was accompanying, in order to whip up the right emotion.
Fergus, originally from Dollar but now living in Glasgow, said: "It was more of a playing gig rather than a composing gig in a way. Spike really wanted to incorporate Stony Gate into the score so Howard orchestrated that, and then we just came and played the music.
"I think, generally, especially in orchestra sessions, they usually just barrel through really quickly. But Spike shows everyone the scene as it is, with demo music.
"He really seemed to care a lot about people really understanding what the point of the music was and matching it to the emotion of the scene."