Opening the second night of the iHeartRadio Music Festival in Las Vegas on Saturday, September 22, Timberlake brought the T-Mobile Arena to a standstill by revealing the identity of his special guest.
"Can I do something special for you tonight?" he asked the crowd. "Ladies and gentlemen, I'm a big fan of this young man. He's one of the coolest cats I've met, he's very talented, and he's about to bless you - please welcome Shawn Mendes to the stage."
The Canadian star then came out to perform with Timberlake on his song "What Goes Around... Comes Around".
Mendes later posted a snap from their duet on Instagram, showing them both playing guitars for the acoustic version of the 2006 track.
"Thank you @justintimberlake for being such an incredible guy," he gushed.
Timberlake performed a hit-laden set at the iHeartRadio Music Festival, including popular tunes "Sexy Back", "Man of the Woods" and "Cry Me A River", but chose to close the show with "Can't Stop the Feeling".
Mendes previously described the 37-year-old singer-songwriter as one of his biggest influences and revealed he was listening to Timberlake's music when he was writing his recent track Lost in Japan.
"I had this dream that I was lost in this country and I woke up the next day and we had this cool piano part and the song was birthed," he explained.