Cobra Kai has worked familiar Karate Kid characters into its story, but the best possible guest star for season 4 isn't a legacy character from the movies. The Netflix series initially centered on Johnny Lawrence (William Zabka) and Daniel LaRusso (Ralph Macchio), The Karate Kid's original hero and villain, as adults. As their decades-old grudge heated up again, more recognizable faces from the franchise have joined in on the action. With appearances from Johnny's former Cobra Kai teammates, his ex-girlfriend Ali (Elisabeth Shue) and other supporting players, Cobra Kai has used its cameos not only as fan service, but to solidify its connection to the nostalgic films.

While Cobra Kai is rife with Karate Kid guest stars and Easter eggs, it also has unofficial ties to How I Met Your Mother. The sitcom famously featured an impassioned speech from Barney Stinson (Neil Patrick Harris) about how Johnny was the true hero of The Karate Kid years before Cobra Kai first aired. When it did premiere on Youtube Red in 2018, Cobra Kai's redemption arc for Johnny spawned jokes that the new show was secretly written by Barney.

Related: Cobra Kai Season 3 Ending & Season 4 Dojo War Setup Explained

The crossover between Cobra Kai and How I Met Your Mother's fandoms has existed for the show's entire run, but it has received little official acknowledgement. In Season 4, Cobra Kai can make the gag come full circle with a cameo from the original Johnny Lawrence fanboy, Neil Patrick Harris.

William Zabka as Himself Neil Patrick Harris as Barney Stinson How I Met Your Mother

Although no canonical references to How I Met Your Mother have happened in Cobra Kai, some of Barney's arguments have come up in the show. Stinson claimed that Daniel only won the All Valley tournament because of a "cheap illegal kick." In Cobra Kai, Johnny asserted the same thing after his rival brought up his defeat years later. The entire show feels like the logical continuation of Barney's view that The Karate Kid was a tragedy. It shows how deeply Johnny's loss at the All Valley affected him emotionally, as he is first introduced as a down-on-his-luck handyman who is caught up in the glory days of the 1980s. His demeanor is still rough, but the new series' Johnny is more sympathetic, much like how Barney must have seen him from the beginning.

The Karate Kid/How I Met Your Mother connection went deeper than a single monologue. After giving the initial rant to his friends, Barney included a "Karate Kid appearance" on his wishlist for his bachelor party. When it was time for the gang to plan the event, Barney's fiancée Robin (Cobie Smulders) suggested that they create the worst night of Barney's life to make it truly memorable. They arranged for Ralph Macchio to come instead of Barney's hero William Zabka, much to his chagrin. However, the "true Karate Kid" came through for the groom-to-be in the end, with Zabka revealing that he had been present the whole time in a clown disguise. After cameos from both of Cobra Kai's stars on How I Met Your Mother, it is only right to make the crossover go both ways and complete the joke.

A Neil Patrick Harris appearance bring a years-long running gag to its best possible conclusion, and his role could also be used to answer a common fan question about Cobra Kai: "Why doesn't anyone call the cops?" Though Barney's job on How I Met Your Mother was long kept a secret, it was revealed that he was secretly a police informant blowing the whistle on a shady corporation. Cobra Kai could reference this by putting Harris in a similar law-enforcing role in season 4. He could show up at the last minute to help bust John Kreese (Martin Kove) and explain that he had been secretly working on the case for months. His character could also be called upon by the heroes but prove too inept to do anything, allowing Harris to show off his comedic prowess.

Next: What To Expect From Cobra Kai Season 4