In the NBC sitcom Night Court, one of the series’ longest-running jokes actually led to a real-life friendship between series lead Harry Anderson and one of the show’s most frequently returning guest stars, Mel Tormé. In the series, Anderson played Judge Harry T. Stone, an eccentric, off-kilter night court judge thrust into the position unceremoniously, and at an atypically young age. Stone had a flair for many odd hobbies, including magic and jazz music.

Like his character, Anderson was also a fan of jazz music, specifically the work of crooner Mel Tormé. Series creator Reinhold Weege said the character and actor’s shared love of jazz and Mel Tormé was merely a coincidence. However, this coincidence led the writers of the show to invite Mel Tormé to appear as himself several times throughout the series, even leading to a late-in-life career resurgence for Tormé.

Related: Where To Watch Night Court Online (Netflix, Hulu, Prime)

Because of their time spent together in the show, actor Harry Anderson and Tormé eventually became close friends. Undoubtedly, as a longtime fan of the singer himself, Anderson must have felt their friendship was a dream come true. The two eventually became close enough that Anderson himself even delivered a eulogy at Tormé’s funeral in 1999.

The ensemble cast of Night Court

What started as a throwaway gag on the show (Judge Stone’s love of Tormé) eventually turned into nine guest appearances from Tormé, during which the two often pretended to be at odds with one another. Tormé even appeared once as Harry’s guardian angel in an homage to It’s a Wonderful Life. Tormé himself would describe his friendship with Anderson onstage in 1988, telling the audience just how much he admired Night Court (which is set to be rebooted by NBC) and Anderson as an actor and human being.

When Tormé passed away in 1999, Anderson eulogized the late singer at his funeral in Los Angeles. In a similar fashion, Anderson referred to Tormé as the type of person who was “as excited about anything as he was about everything.” His eulogy was likely not only a reference to Tormé’s work on Night Court, but also Tormé’s approach to life as a whole.

Nonetheless, when Night Court ended, the series had several questions left to be answered. However, one thing was certain: Anderson and Tormé’s on-screen rapport was just as good as their off-screen friendship. It turns out, Night Court, though outrageous and exaggerated at times, was actually the perfect backdrop for the beginnings of a real, lifelong friendship.

Next: Night Court Was Based On A True Story