Modern Family opened its fifth season with a gay marriage proposal.

On Wednesday's premiere episode, the show's gay dads, Mitchell Pritchett (played by openly gay Jesse Tyler Ferguson) and Cameron Tucker (Eric Stonestreet), got engaged.

The inspiration behind marrying the couple came from the fall of Proposition 8, California's constitutional amendment approved by voters in 2008 which limited marriage to heterosexual couples.

“We hadn't really talked about Mitch and Cam getting married until DOMA and Prop 8 came onto our radar when we got back to work in the middle of May,” Jeffrey Richman, one of the comedy's two openly gay writer-producers, told The Hollywood Reporter. “We don't usually do California-centric stories – and while we don't really identify where the characters live, we knew we weren't going to send them to another state to get married and they weren't going to have a fake commitment ceremony. We'd avoided that for four seasons. Mitch and Cam have been in a relationship for eight years, they already are a family and they have a daughter, so there needed to be a reason for them to get married. This became the 'why now.'”

“As I started writing, I became unexpectedly emotional. I teared up writing it. I teared up hearing it read. And I completely teared up seeing that moment when they both just say 'yes' at the exact same time.”