Eminem shocked everyone when he took the Oscars stage on Sunday to perform his Academy Award-winning song from 8 Mile, "Lose Yourself," and only a handful of people were in on his surprise appearance, which had been in the works for several years.
"I want to say the first time it was ever talked about was after Justin Timberlake opened with 'Can't Stop the Feeling' in . There are just these songs when you have an iconic performer opening with an anthem like that it just gets everybody pumped up," Robert Mills, Senior Vice President of Alternative Series, Specials and Late-Night Programming at ABC, exclusively told ET's Lauren Zima on Monday. "We talked about it with the Academy that Eminem, the fact that he never performed that song and it's such an anthem, and it's one everybody knows and it won the Oscar. Wouldn't it be great to figure out a way to get him to come and do that?"
"It had to be the right time, it had to be in the right place in the show," Mills continued. "This year the producers... had a relationship with Interscope, his label and really made it happened -- and it surprised us up until a few days before because it really was keeping the circle tight so that nobody would ruin it."
During Sunday's ceremony, the 47-year-old rapper appeared on stage following a lengthy montage celebrating iconic songs from films of the past several decades, which ended on "Lose Yourself." Moments later, he and his band suddenly appeared from below the stage, as the signature notes to the seminal 2002 track echoed throughout the star-studded Dolby Theatre as Eminem dove into a full performance of the song.
Eminem's unexpected performance, which was met with excitement and confusion, had been discussed for quite some time. As Mills explained, it was important to Eminem that his Oscars cameo be kept under the wraps until the ceremony.
This video is unavailable because we were unable to load a message from our sponsors.
If you are using ad-blocking software, please disable it and reload the page.
Oscars 2020: Inside the Oscar After-Parties
"The element of surprise was really paramount to him that I think had it been leaked, he would have backed out," he conjectured. "It was great that it was able to be kept such a huge, jaw-dropping surprise."
"Really, up until 48 hours before, I think maybe six people knew," Mills revealed. "The Academy, us at the network, the producers and Eminem's team. And that was really it."
Surprisingly, there wasn't much prep work beforehand before Eminem's performance night of and Mills said they had contingency plans in place in case unexpected parties walked in on the secret rehearsals.
"He rehearsed it once and that was it," Mills said of Eminem's performance, sharing that they had planned another ending to the musical montage just in case. "When we did dress rehearsals, there was a whole alternate beat where it was just Eminem's band playing 'You Should Be Dancing' by The Bee Gees with John Travolta in the background, so that's how much it was kept a secret and surprise. There was a whole alternate ending to that beat."
"If anybody happened to wander in and see it they would have been like, 'Oh yeah, there's been a switch with a salute to Saturday Night Fever," he confirmed. "It was a fake-out."
Mills reaffirmed Eminem's wishes that it was crucial that everything be kept quiet, especially difficult in a media landscape that lives for spoilers and leaks. "I think for him, it was just so unexpected and he wanted to keep it that way, and it's so hard now with the rise of social media and Twitter and everything to keep anything a secret," he said, though Mills confessed he didn't have the exact answer for why Eminem decided 2020 was the year to honor his Oscar-winning song, "Lose Yourself"
"I can't say for sure, I think it was really a testament to the producers... who had promised this would be done in the way he would want to do it -- a salute to the number," Mills said. "He's going to get to perform it on the biggest stage and we'll make sure to keep it secret. There was a real trust factor there."
After taking the Oscars stage, Eminem -- whose real name is Marshall Mathers -- took to Twitter to thank the Academy for letting him have his moment -- nearly two decades later.
The tweet was accompanied by a video of presenter Barbra Streisand announcing Eminem's win for Best Original Song at the 2003 Oscar ceremony, which he chose not to attend. Eminem reportedly skipped the Academy Awards that year because he preferred to stay home in Detroit, Michigan, and allegedly napped through his Oscar-night upset.
That year, Eminem beat out Renee Zellweger and Catherine Zeta-Jones' "I Move On," from Chicago; Caetano Veloso and Lila Downs' "Burn It Blue," from Frida; U2's "The Hands That Built America," from Gangs of New York; and Paul Simon's "Father and Daughter," from The Wild Thornberrys Movie.
Eminem has been out and about the past several months, showing support for his fellow friends (like at 50 Cent's Walk of Fame ceremony) and being more visible in the public eye after releasing his latest album, Music to Be Murdered By..., in January.
To stay up to date on breaking news, sign up for ET's daily newsletter.