TMZ spoiled the surprise a few days ago, but the rumor proved true — pop superstar Ariana Grande and ’90s boy band sensation 'N Sync collaborated to close down the first weekend of Coachella on Sunday night (minus Justin Timberlake, of course).

As the final performer, Grande — who, at 25, is the youngest artist to ever headline the music festival — was under pressure: Not only did she have to live up to the hype, but the final season premiere of “Game of Thrones” threatened to steal the Internet’s attention.

Luckily, Grande is the biggest pop star in the world at the moment, so her powerful fan base ensured that #ARICHELLA was trending worldwide on Twitter in the lead-up to her set, which kicked off close to 2 a.m. Eastern time and was live-streamed on YouTube. Plus, she had quite the list of cameos: Nicki Minaj, Diddy and Mase also joined forces onstage with Grande.

Grande ran through a set list very similar to her current Sweetener World Tour, though the twists started about 15 minutes into the show. In the middle of “Break Up With Your Girlfriend, I’m Bored,” she suddenly stopped singing.

“Ladies and gentlemen,” Grande announced. “'N Sync!”

In that particular song, Grande samples “It Makes Me Ill,” a cut from the band’s massive 2000 album, “No Strings Attached.” And whether or not Coachella fans were familiar with that fact, the audience let loose ear-shattering levels of screams when JC Chasez, Lance Bass, Joey Fatone and Chris Kirkpatrick appeared for a rare reunion. (There was no word on Timberlake’s location.)

Along with Grande, the foursome supplied the lyrics, which are about extreme jealousy (“I can’t see you with another guy / It makes me ill / To see you give love and attention at his will. . .”) and joined in for some intense choreography. When they wrapped the song, a breathless Grande turned toward the crowd and beamed.

“I’ve been rehearsing my whole. . .life for this moment!” yelled Grande, a longtime fan of the boy band. Then they all launched into “Tearin’ Up My Heart,” the group’s hit single from 1997, and the audience predictably lost it once more.

Afterward, Chasez acted as group spokesman. “Ariana, thank you for sharing this with us! We love you!” he called out. “We love you, Coachella.”

Later, the crowd erupted again when Minaj joined in for “Side to Side,” Grande’s 2016 single that she also co-wrote. The pair segued into “Bang Bang,” their 2014 hit with Jessie J, although technical malfunctions marred the performance. “We can’t hear anything!” Grande said frantically as she pointed to her earpiece. Still, she and Minaj shrugged it off and somehow managed to finish the song without actually being able to hear themselves.

Similar sound issues appeared to plague Diddy and Mase when they arrived to sing “Mo Money Mo Problems,” their 1999 smash with the Notorious B.I.G. Despite the technical difficulties, they paid tribute to him — along with Mac Miller, Tupac Shakur and Nipsey Hussle — during the emotional performance as the audience held peace signs up in the air.

At the end, Grande started walking offstage, but Diddy stopped her and encouraged the crowd to applaud the pop star. “She’s been through a whole lot, but she’s still standing,” he said. “Give it up for the number one artist in the world!”

Read more: