The “Sign of the Times” singer, 23, greeted the enthusiastic audience, telling them, “I actually have some great news. Just half an hour ago, James and his wife Jules had a beautiful baby girl.”

Terence Patrick/CBS

Styles told the audience he “was just at the hospital before I came to fill in and she looks a lot like James — mainly because James looks like a giant baby.”

While he looked at ease in his hosting duties (which included interview guests Owen Wilson, Jane Krakowski and Joel Edgerton), Styles said he was given two hours warning before stepping on the Late Late Show‘s stage.

“I was sitting at home two hours ago in this suit, obviously,” he said. “I got the call Jules was going into labor so James naturally called the funniest man he knew… he obviously wasn’t available.”

RELATED VIDEO: It’s a Girl! James Corden and Wife Julia Welcome Third Child

Styles and Corden, 39, have frequently collaborated together on the late night show — including a week-long residency by Styles in May in which he appeared in each episode to perform songs off his self-titled debut album.

Corden announced the birth of his third child with his wife, and not Styles, via Twitter Tuesday.

“Today we welcomed a beautiful baby daughter into the world. Both she and her mother are doing great. We can’t stop smiling,” The Late Late Show host wrote. “Thank you Harry [Styles] for stepping in to host the show at 2 and a half hours notice! x x x”