Actor Hank Azaria was left stunned while filming his new Fatherhood web series after discovering he was to become a first-time dad himself.

The Smurfs star had initially set out to explore why anyone would want to have children and had started interviewing a number of celebrity pals, like Kevin Bacon and Mike Myers, for the docu-series in early 2009 when his own personal life was turned upside down.

The moment he learned his then-girlfriend, former actress Katie Wright, was pregnant was caught on camera during the project, and Azaria has since included the footage in the first episode of Fatherhood.

He reveals the news took them both by surprise, but it was bittersweet - because they had just lost their beloved dog.

During an interview on U.S. breakfast show Today, the 49 year old says, "We were shooting this and then my dog of 16 years started to die, (she was) very old. The day we put her down, we found out we were pregnant and we were shooting all this rather insanely."

Baby boy Hal was born 10 weeks premature in June, 2009, and the comments about fatherhood and tips Azaria had received from his pals quickly began making sense to him.

And he reveals Bacon's words of advice proved the most useful: "I can't remember whether we were pregnant or not when I was talking to him (Bacon); it was very early in the (filming) process, and he said, 'The phases will drive you up a wall, but remember whatever phase the kid's in, whether you love it or you hate it, it's gonna pass. They don't tell you that, so particularly in the whiny stage, you know what? He's not gonna be like this forever.'"