Matt Damon and David Letterman made a brief, unexpected appearance in the fourth-season premiere of The Gilded Age, which aired Sunday, November 1. The two were visible for about six seconds, beginning around eight minutes and 33 seconds into the episode, as they walked across a street dressed to match the period drama’s setting. Neither had any dialogue.

Damon appeared with sideburns and a bushy mustache, while Letterman kept his full beard. The cameo came together through research for Damon’s upcoming appearance on Letterman’s Netflix program, My Next Guest Needs No Introduction.

According to showrunner Isabel Richardson, the production team learned that Damon had started his career as a background actor. That made a period-drama appearance alongside Letterman, who had long wanted to work as a background actor after seeing his friend Gary Mule Deer in Annie Hall, seem like a fitting idea.

Richardson said Damon immediately chose the cameo concept from a list of possible field-segment ideas, calling it the “silliest, most ridiculous idea.” The team then explored productions filming in New York and identified The Gilded Age. A connection between a line producer on My Next Guest and someone working on the HBO series helped move the request forward.

The proposal reached The Gilded Age executive producer Kate Churchill, who presented it to creator and showrunner Julian Fellowes, HBO head of drama Francesca Orsi and HBO CEO Casey Bloys. They all supported the idea, although Churchill was concerned that the recognizable guests could distract viewers.

To keep the appearance controlled, the scene was filmed on a closed set and designed as a shot the production already needed. Coordinating the actors’ schedules and production arrangements proved complicated, including the requirement that Damon be paid as a background performer despite working through his own company.

Churchill recalled that Letterman was highly enthusiastic and curious during filming. Richardson said Damon laughed throughout the day and had to hold onto his mustache to keep it from coming loose. Churchill described the collaboration as an unusually authentic and enjoyable moment for both productions.

Sources: Just Jared.