Longtime "Tonight Show" host Jay Leno taped his last show Thursday night, giving a heartfelt goodbye to a 22-year run as one of the most beloved hosts of late-night television.

It was not Leno's decision to leave "The Tonight Show." NBC decided to replace Leno with Jimmy Fallon, who currently hosts his show "Late Night With Jimmy Fallon."

"It's fun to kind of be the old guy and sit back here and see where the next generation takes this great institution," said Leno, 63, according to The New York Times. "But it really is time to go and hand it off to the next guy, it really is."

Several celebrities showed up to celebrate Leno's last show, including Billy Crystal, who was Leno's very first guest when he started in 1992. Crystal led a performance of "So Long, Farewell" from the musical "The Sound of Music" along with Oprah Winfrey, Kim Kardashian, Jack Black, Sheryl Crow, and Carol Burnet, The Washington Post reported.

"Tonight Show" ratings went up during the week leading up to Leno's departure, The New York Times reported. But NBC is hoping to target people younger than Leno's audience average of 58-years-old.

Leno said what he appreciated most about the show was his staff.

"The first year of this show I lost my mom; the second year I lost my dad. Then my brother died and after that I was pretty much out of family. The folks here became my family," Leno said, according to The Washington Post. "When people say to me, 'Hey, why don't you go to ABC, why don't' you go to Fox?'- I didn't know anybody over there. These are the only people I know."

NBC tried to replace Leno before by having Conan O'Brien host the show in 2009. But O'Brien only lasted as host for seven months before he left and Leno came back in 2010.

This time, however, Leno's departure seems to be for good.

Fallon, 39, is set to take over "The Tonight Show" on Feb. 17.