When co-creators Christopher Lloyd and Steven Levitan decided to set the 11th and final season of “Modern Family” at 18 episodes, they didn’t realize how fortuitous the timing would turn out to be. The series finale of the long-running family sitcom finished filming in late February, mere weeks before the outbreak of the coronavirus would force the entertainment industry — along with countless other businesses — to grind to a halt.

“It’s very strange to contemplate that,” says Lloyd. “Had we done, say, our normal number of episodes, which would be 22 or 24, we would’ve come to a place where [the production would have been forced to shut down], so we would’ve aired everything but our finale and then, who knows? Like, we would’ve filmed it and aired it in mid-August or something. It’s really weird to think that we avoided that just by electing to do fewer episodes than we normally do. Had we done two or three more, we probably would’ve been shut down.”

The final days on set were expectedly teary and nostalgia-inducing.

“It was like a really long funeral,” says Jesse Tyler Ferguson, who plays Mitchell Pritchett. “It also felt like a graduation at the same time. There was a lot of emotion.” 

The finale’s storyline revolves around a long goodbye for the Dunphy, Pritchett-Delgado and Tucker-Pritchett families, which made shooting during that last week “kind of torturous,” he says. “It was literally the cast saying goodbye to one another over and over again.” 

The cast and crew weren’t the only ones present for the sendoff. A number of directors, writers and actors from previous seasons stopped by the set to pay their respects and engage in the merriment that Tyler Ferguson likened to a block party. Among the revelers were the children of Julie Bowen, who plays Dunphy family matriarch Claire — including her twins, who “were in my belly in the pilot [and] born the day the show was picked up,” she says. Also on hand: Tyler Ferguson’s husband, Justin Mikita; Joe Manganiello, the husband of Sofía Vergara (Gloria Delgado-Pritchett); and Ty Burrell’s wife and children.

“It was a little bit of a carnival atmosphere that at times made it difficult to actually get the job done,” says Bowen. “But at the same time, we had to be aware that this wasn’t just the actors’ show; this was everybody from props and casting to accounting to transpo. … Everybody wanted to be there as much as they could that last week.” 

With 250 episodes across 11 seasons, “Modern Family” spanned all of the 2010s, which Levitan — noting that the majority of the show took place during the Obama administration — describes as “kinder and gentler times than we’re living in now.” Nestled among his many favorite episodes over the years are the behind-the-scenes moments that still provide chuckles, such as a scene between Burrell (Phil Dunphy) and Ed O’Neill (Jay Pritchett) in Season 1’s “Hawaii,” in which Phil tries to help an injured Jay out of a hammock.

“Ty Burrell and I talk about it to this day, that it’s the hardest either of us has ever laughed on a set,” says Levitan. “It was so funny that we had a sound guy who was on a rafter, and he fell out of the rafter [from] laughing. He literally fell out. Little moments like that, I will think about.”

Lazy loaded image
Ariel Winter, Nolan Gould and Sarah Hyland, who play the Dunphy children, take a selfie in the two-part final episode of “Modern Family.” Eric McCandless/ABC

The show has survived and thrived through the era of Peak TV, picking up 82 Emmy nominations and 22 wins — including a record-tying five straight wins for best comedy series. Despite ratings declines over the years, the 20th Century Fox Television-produced program has continued to perform solidly for ABC. That it has been allowed to carve out its own ending by choosing when and how to wrap up is a privilege most series don’t enjoy. 

Eric Stonestreet, who plays Cam on the show, chafes on behalf of the writers at viewer complaints that the series “used to be better.” 

“That’s just what happens with the arc of an 11-year run,” he says. “I laugh at that, but it also irks me a little bit to think that there are people who watch the show who have that sort of opinion, like, ‘Oh, they must’ve fired all the writers.’ No, it’s just not easy to create 250 episodes of fresh television and then be critically judged by someone who knows nothing about creating television. That always bothers me on behalf of our writers who I know worked just as hard from Day 1 as they did on the last day.” 

The “Modern Family” brand of big, broad comedy is considered far from controversial, but its on-screen portrayal of a same-sex couple — whose ups and downs largely mirrored everyone else’s — was stealthily revolutionary when the show debuted on America’s TV screens in 2009.

“I just hope people, with respect to Mitch and Cam, look back in 10 years at how un-modern it is — the opposite of what it was when we started the show,” says Stonestreet, whose wish is that the series showed audiences “that it was OK for two men or two women to make just as many mistakes raising a baby as a man and a woman.” 

Whether there’s space for another big network sitcom in the 2020s is hard to project; “Modern Family” might be one of the last of its kind. The market is now increasingly filled with well-funded streaming services and short-order cable series.

“I’ve been writing for network television for almost 35 years,” says Lloyd, whose career has spanned “Wings,” “Frasier” and “Back to You.” “It’s what I’ve always done, and I’m inclined to continue trying it.” 

But he is open to the possibility of new things.

“The environment has changed, and it is tempting to imagine taking a very specific subject and exploring it over only 10 episodes or 20 episodes and moving on,” he says. “So it seems like a good time to be trying different things, but I still think there’s a lot of life left in network television.”

Levitan, who last year re-upped his deal with 20th Century Fox TV, is already tinkering with a new half-hour script along with two “Modern Family” scribes and an additional collaborator, working over thoughts via video chat meetings during the lockdown. The story is loosely based on a friend’s life, and is “more specific and deals with perhaps, one might say, ‘streamier’ ideas.” 

As for cast members, they’ll be scattered across new projects once the industry’s gears start whirring again. Prior to the shutdown, Bowen had been slated to topline the CBS multi-camera pilot “Raised by Wolves,” while Tyler Ferguson was in preparations for both a Broadway revival of Richard Greenberg’s “Take Me Out” and another potential season hosting “Extreme Makeover: Home Edition.” He and his husband are also expecting a baby in July. Vergara is set to judge “America’s Got Talent.” Burrell is focused on relief effort Tip Your Server, which aims to support Salt Lake City restaurant workers whose livelihoods have been impacted by the coronavirus-driven closures and recent earthquakes. 

But the “Modern Family” production members will always be, well, family.

They have vacationed together, celebrated successes together and comforted each other in tough times, says Lloyd, “all the while enjoying a very rare thing in Hollywood, which is a commercial success and a critical success. All a wonderful mix. To say goodbye to all of that is very difficult. And everyone knows you won’t be on a show like this again. You won’t be around this group of people again.”