Saturday Night Live gave a touching tribute to Matthew Perry after the actor and former host died.

It was only several hours before SNL went on the air that news broke about Friends star Matthew Perry's passing. However, the comedy show was able to add a special tribute to him, according to Entertainment Weekly.

The tribute was made just before the goodnight at the end of the episode that was hosted by comedian Nate Bargatze and featured Foo Fighters as the musical guests. They put up a special tribute card for Perry with his name and photo.

It's no wonder why they did this, considering Matthew hosted the sketch show on October 4, 1997, with musical guest Oasis.

Matthew Perry's SNL appearance

During Perry's show in the '90s, his monologue included him encouraging NYC residents to help re-create the opening fountain dance in the Friends opening. The show also features a sketch titled Sacarasm 101, where Perry schooled many students, including Will Ferrell, Cheri Oteri, and Norm Macdonald, on his comedic tone.

Included in the episode was also a Friends parody. In this, Perry played Joey and objected when Colin Quinn played Chandler effeminately.

Perry was the 4th Friends cast member to host SNL. He followed Courteney Cox and David Schwimmer, who, in 1995, both hosted. In 1997, Lisa Kudrow hosted the show. And then Jennifer Aniston hosted in 1999 and 2004. As for Matt LeBlanc, who played Joey, he never hosted.

Matthew Perry was found unresponsive in a hot tub at his Los Angeles home on Saturday. First responders were called for cardiac arrest, according to the Los Angeles Times. He was 54.