Downton Abbey—which follows the aristocratic Crawley family and their dedicated servants on a fictional Yorkshire estate—is set to hit the silver screen September 20. The film version reunites the TV series’ cast, creator Julian Fellowes, and another key element of Downton’s success: its instantly recognizable theme.

“When the music actually started and the original title sequence tune came in, everybody clapped and cheered. It was clear to the directors and producers that the music was as much a part of the show as the cast,” said Downton Abbey composer John Lunn, shortly after a test screening of the film in Los Angeles this spring.

Those fans wouldn’t know that the show’s iconic title riff—soaring strings beneath a simple, monophonic piano refrain—nearly didn’t make it into the finished show. “There was no title sequence in episode one,” Lunn explained. “The episode started with a telegram, and then it cut to a train and a close up of the train. And so I started trying to get the motion of the train: ‘datadatadata.’”

The scene then cut to a lonesome Bates (Brendan Coyle), arriving at Downton via that locomotive. The sight inspired Lunn: “He was looking quite forlorn, so I picked out this high piano tune that was a bit solitary. And then it cuts back to the telegram and the clouds behind it. And so I brought in this string tune.”

Every moment in that opening sequence helped Lunn put together the theme, which would soon become an indelible part of Downton. “Then we follow the telegram, and the telegram is carrying the news that the heir to Downton Abbey has drowned on the Titanic. But we don’t know this,” he continued. “So although what you are seeing doesn’t really mean anything to the audience yet, I am trying to imbue it with a meaning, to suggest there is something more going on here than what you are seeing. And then you finally arrive at a great picture of the house, and the music just sort of broadens out.”

“And that was the first thing I wrote, and everyone really liked that. And by the end of the first episode, we just knew that was going to work.”

If Lunn had been working off of the title sequence that wound up accompanying the show’s subsequent episodes—close-up shots of the estate’s inner workings, which emphasize the show’s focus on drama both upstairs and downstairs—he likely never would have written that memorable motif. “The picture that they ultimately put to the music—if I’d been presented with those pictures from the title, I probably would not have come up with that music,” he said. “Because they’re all about dusting chandeliers, and it would have been much more staid and much more formal. So that was quite a stroke of luck to do it that way.”

Without question, though, the music Lunn ultimately created “does kind of sum up Downton,” he said. “It’s like a shorthand for what you are about to see.”

For the film, Lunn has sought to achieve something similar. From what we know so far, the plot will focus on the Downton household preparing for a royal visit from King George V and Queen Mary in 1927. But tension builds when Downton’s staff learns that the royal staff will be taking over the house—denying them a vital opportunity. With typical Downton charm, though, they manage to contrive ways to look after the king and queen themselves. “And that is both ingenious and quite hysterically funny,” Lunn said. “If you think of it in terms of an episode of Downton, it’s probably on the lighter side than on the emotional side of it."