The swap was kept a secret until the last minute, with even the two studio audiences being kept in the dark until the comedians emerged for their opening monologues. The hosts revealed that they had been planning this prank for four years, and noted that the idea sprung from fans frequently confusing the two hosts who share a first name. When Fallon took the stage in Kimmel’s studio, said “hi, I’m Jimmy” to thunderous applause, before asking the audience to calm down because “you’re going to offend the other Jimmy.” Kimmel was more subtle, opening his monologue by saying “I’m Jimmy Fallon and welcome to ‘The Tonight Show.’”

Both stars took the opportunity to tell jokes about Will Smith’s Oscars slap to new audiences, with Fallon quipping that “for surprises on ABC this week, this one’s a distant second,” and Kimmel jokingly asking the audience if the news about the slap had made it to the East Coast. Kimmel’s ‘Tonight Show’ guests were Hugh Jackman and Bridget Everett, while Fallon interviewed his longtime pal Justin Timberlake (who dressed up as Matt Damon) and Kimmel’s Aunt Chippy. The Red Hot Chilli Peppers served as the musical guest for both shows. Both hosts tried to put their own spin on each other’s format, with Kimmel riffing with The Roots and the famously jovial Fallon revamping Kimmel’s “Mean Tweets” bit as “Sweet Tweets.” The stunt is the latest example of the collegial relationships that today’s late night hosts enjoy with each other. Last year, Fallon and Kimmel teamed up with Stephen Colbert, James Corden, Seth Meyers, Samantha Bee, Trevor Noah, and Andy Cohen for “Climate Night,” a massive special promoting efforts to curb climate change. Fallon and Kimmel had previously taped segments for “The Late Show With Stephen Colbert” to support the host when he first moved to CBS. Watch Kimmel performing the “Tonight Show” monologue below:

Sign Up: Stay on top of the latest breaking film and TV news! Sign up for our Email Newsletters here.