On Feb. 2, 2014, TV viewers were treated to Prince at his comedic best, when the iconic musician appeared in an episode of New Girl which aired immediately after the Super Bowl.

The collaboration came about surprisingly organically. He had discovered the sitcom and become a fan, watching the show regularly. When someone told New Girl creator Liz Meriwether this information, the TV producer questioned its validity.

“How could that be true?” Meriwether pondered in a 2016 essay for Vulture. “We weren’t cool enough for Prince — we did an entire episode about someone leaving a wet towel in the bathroom.”

Still, hoping the rumor was accurate, Meriwether reached out to Prince’s manager and suggested the rocker guest star in a Season Two episode titled “Virgins.” The legendary musician passed, but his manager relayed that Prince may be interested in a different role down the line.

“I thought that was just the polite bullshit of the casting world,” Meriwether admitted, thinking that the cameo would never come to fruition.

To everyone’s surprise, an email from Prince’s manager arrived several months later in the inbox of New Girl’s star, Zooey Deschanel.

“This has to be like a prank!” the actress said, recalling her reaction years later with Jimmy Kimmel.

Again, Meriwether had her doubts. “A very real part of me felt that this was a prank some mean girls from middle school had spent 15 years concocting.”

Nevertheless, the writer and show creator agreed to meet Prince’s manager to pitch the episode’s idea. The plot would center around Deschanel’s character, Jess, and the will-they, won’t-they romance with her roommate, Nick (Jake Johnson). The characters, along with their inner circle of friends, would end up at a party at Prince’s house. There, with the musician’s assistance, the couple would say “I love you” for the first time.

“It was a big moment for our show,” Meriwether admitted, adding that Prince liked the idea of being the conduit of love between the two main characters.

The production would move forward, with the episode given the vaunted after-Super Bowl spot. Despite knowing that Prince routinely pulled out of projects last-minute, Meriwether began to get excited.

Four days before the episode was scheduled to start shooting, she got a phone call from the iconic rocker. “He wasn’t happy," the show creator confessed. "The script had changed from the script he had read. He apologized but said he was going to have to back out.”

Meriwether’s heart sank. There was no backup plan.

“I knew exactly what had happened,” the TV veteran later recalled. “The network had asked us to end the episode at the loft, the home base of the show, instead of at Prince’s house, and I had changed the story to have Nick and Jess say ‘I love you’ back in their bathroom, away from Prince and his influence.”

Desperate, Meriwether asked Prince for a chance to fix the script. He agreed, and the changes helped bring him back on board.

“By 9PM, he was back in,” the show creator remembered. “I still don’t know why he gave me another chance.”

Even as shooting on the episode began, the cast members questioned whether Prince would actually show.

“To the very last second we were not sure if he was going to come to set,” Deschanel admitted. “And they’d already spent so much money on this episode, it was the Super Bowl episode and there was so much riding on it and we didn’t know. We were like, ‘I hope he’s the type that shows up.’”

Not only did Prince show up, but he was deeply invested in the project.

Watch Nick and Jess Meet Prince

“He told us he wanted the party on the show to be as close as possible to what parties at his house were really like,” Meriwether recalled, adding that Prince gave consideration to even the tiniest details. “He wanted to choose the name of the non-speaking chef character, the chef’s wardrobe, the paintings on the walls, the linens in the bedroom set, his wardrobe, Zooey’s wardrobe, the music, the pancakes, the hairstyles … he had a piece of art, a poem written out in the shape of an egg, flown from Minnesota to hang on the wall of the set. His vision of the episode was all-encompassing, but I never felt overpowered. He always asked what I thought. It was like he was asking me to rise up to meet him.”

“He was so shockingly nice,” added Johnson. “And, you know, it is Prince, so every member of our crew and cast, everybody was fanning out of him.”

Watch a Scene Between Prince and Jess

The musician -- who was notorious for his wry sense of humor -- embraced the chance to play a more extreme version of himself, turning New Girl’s version of Prince into an all-knowing love guru. Writers were even sure to infuse elements of his personality into the episode, including his love of pancakes and penchant for ping-pong.

“He really has great instincts for comedy,” Meriwether told the Today show. “He knew the show really well. His vibe played in really well with Zooey because she's more outgoing and louder and goofier. He's laid-back and very wise, an extremely cool sort of oracle."

In the episode’s climactic moment, Prince would take the stage to perform his new song “Fallinlove2nite.” With cameras rolling, he improvised, pulling out a megaphone and asking the partygoers, “Does anyone want to fall in love tonight?”

“Everyone cheered,” Meriwether recalled of the cast’s response. “We hadn’t asked them to. It was just a feeling. You just had to shout out. The megaphone made the song suddenly feel like a movement, like a political rally, like we were all standing there together that night in support of falling in love. It was brilliant.”

The “Prince” episode of New Girl was watched by more than 26 million viewers, easily becoming the highest-rated in the sitcom’s history. Following Prince's death in 2016, Fox re-aired the episode in tribute to the fallen star.

Watch Prince Perform “Fallinlove2nite" on 'New Girl'


Prince's 'Saturday Night Live' History

More From Ultimate Prince