1.1429398-1704531174
In this Dec. 15, 2014 photo released by CBS, host Craig Ferguson appears on the set of "The Late Late Show with Craig Ferguson," in Los Angeles. Ferguson's final show will be on Friday. (AP Photo/CBS, Monty Brinton) Image Credit: AP

Was it Bob Newhart horsing around all those years on The Late Late Show?

That whimsical notion is part of the revelry during Craig Ferguson’s final hour as host of the CBS talk show.

Secretariat the Pantomime Horse has long been a popular member of the Late Late Show troupe, but proper credit was never given to the people who brought him to life. That mystery is answered — well, sort of — in the finale.

As Ferguson chats with his robot sidekick, Geoff, he ponders who is inside the horse costume.

“Lift up your head, let’s see who you really are,” he calls across the stage to Secretariat, standing in his stall. Off comes the head of the costume to reveal Bob Newhart.

“What are you doing here?” the astonished Ferguson asks.

“Hey, guy, it’s YOUR dream,” replies the veteran actor-comedian, spoofing the classic final scene from his sitcom, Newhart, a quarter-century ago.

Ferguson’s going-away party also features former Tonight Show host Jay Leno as his sole guest.

The show kicks off with a pre-taped rendition of Bang Your Drum, a song by the Scottish band Dead Man Fall, with Ferguson accompanied by dozens of celebs (many of them former guests) including Matthew McConaughey, Betty White, Samuel L. Jackson, Larry King, Regis Philbin, Jane Lynch, Quentin Tarantino, Jimmy Kimmel, William Shatner and even Archbishop Desmond Tutu.

The number then transitions to the studio with Ferguson backed by a rock band and choir.

Ferguson’s departure follows by a day the splashy exit of Stephen Colbert and his series The Colbert Report from Comedy Central after nine years on the air. Colbert is headed to CBS to take over Late Show from David Letterman, who retires on May 20.

Taking Ferguson’s place as host of The Late Late Show: British actor-writer-comedian James Corden, who debuts on March 23.

Now 52, the Scottish-born Ferguson came to The Late Late Show in January 2005 with a varied resume including punk-rock drummer, author, standup comic and actor. He had appeared in several films, and written and starred in three, including the 2003 comedy I’ll Be There, which he also directed. At the time, he was best known as Nigel Wick, the imperious British boss on Drew Carey’s long-running ABC sitcom.

Carey will be among those filling in on Late Late Show before Corden arrives. Other scheduled guest hosts include Will Arnett, Wayne Brady, Jim Gaffigan, Billy Gardell and Sean Hayes.

But even if he’s absent from late night, Ferguson won’t be absent from the airwaves. He continues as host of Celebrity Name Game, a weekday syndicated game show launched this fall.