Peter Scolari won his first ever Emmy Award, Best Comedy Series Guest Actor, for playing Lena Dunham’s dad on HBO’s Girls. And he wasn’t even in contention on Emmy nomination day.

“Wow I just talked myself out of it too,” Scolari said onstage, before launching into thanks for Dunham and many others including “my family who teach me the hard stuff, how to be someone who listens on and off the set.”

Scolari was a bit of a surprise; having been tapped as a new nominee for the Emmy Awards’ category a week after the official Emmy nominations. He replaced Peter MacNicol, who was originally nominated for his role on HBO’s Veep but was disqualified when the TV Academy discovered that he had appeared in slightly more than 50% of the show’s 10 episodes. That’s too much to be eligible as a “guest” actor, TV Academy rules say.

By being a substitute, Scolari presumably had garnered fewer votes than the other contenders in the category in the nominations round, but he triumphed today with a come-from-behind win. Among those who Scolari bested in this extremely competitive derby were Larry David and Tracy Morgan, each nommed for hosting Saturday Night Live, as well as Martin Mull, and previous winners Bradley Whitford and Bob Newhart.

“I had pushed past it, done some work on myself to be OK with not being nominated,” he said backstage tonight. “So when it came through in the way it did I was really quite taken aback, and flush with gratitude and really humbled by it.”