Ryan Seacrest gets stuck in an elevator on his way to New Year's Eve ball

Ryan Seacrest found himself stuck in an elevator Friday morning as he was en route to show off the New Year's Eve ball in Times Square.

Read: New Year's Eve Security to Be Especially Tight in Wake of European Terror Attacks

The host of Dick Clark's New Year's Rockin' Eve was on his way to the top of 1 Times Square, where the New Year's Eve ball will drop, with producers from Good Morning America Friday morning when he got stuck in an elevator.

He was scheduled to go live on Good Morning America at 7:48 a.m., but couldn't get out in time to make it.

The 42-year-old TV personality was trapped for about 40 minutes before the FDNY rescued him and the GMA staffers.

He posted about his ordeal on social media and kept fans updated as to what was happening.

Also see Ryan Seacrest through the years:

Read: From the Pulse Nightclub Shooting to Pokemon Go, Here Are the Top Newsmakers of 2016

After his rescue, he told Inside Edition: "We had Altoids, cough drops and someone had one Advil."

Jenny McCarthy will return to co-host the annual New Year's Eve special with Seacrest.

Watch: Oh Baby! Meet the Infants Who Defied All Odds to Survive in 2016