The Oscars are no stranger to surprises, but usually, it's not musical guests who are surprising viewers.

This year, however, the Academy shocked both the star-studded audience and viewers at home with a performance from Eminem.

The rapper performed "Lose Yourself" from the film "8 Mile," which won the award for best original song in 2003.

OSCARS 2020: SALMA HAYEK, PENELOPE CRUZ SHARE ADORABLE MOMENT TOGETHER ON RED CARPET

Eminem, 47, tweeted about the performance, referencing the fact that he was not present when he won the award.

"Look, if you had another shot, another opportunity... Thanks for having me@TheAcademy," he wrote. "Sorry it took me 18 years to get here."

The tweet was accompanied by a video of Barbra Streisand announcing that the rapper's song had won.

Viewers took to Twitter to express their surprise within minutes of his appearance, which earned him a standing ovation.

OSCARS 2020: BILLIE EILISH'S REACTION TO MAYA RUDOLPH, KRISTEN WIIG'S SPEECH GOES VIRAL

"YOOOOOO IS THIS FOR REAL!?!???" said one user.

Eminem performs onstage during the 92nd Oscars at the Dolby Theatre in Hollywood, California on February 9, 2020.  (MARK RALSTON/AFP via Getty Images)

"Whaaaaaaaat #Eminem! Totally didn’t expect that!!!" wrote another. "The #Oscars actually managed to surprise me..."

"WHOA I did NOT expect to EVER see Eminem make an appearance at the Oscars..." wrote one person. "Neither did the audience!!"

OSCARS 2020: BILLIE EILISH'S REACTION TO MAYA RUDOLPH, KRISTEN WIIG'S SPEECH GOES VIRAL

One user "got goosebumps" after seeing "the best musical moment at" the Oscars.

Eminem performs onstage during the 92nd Annual Academy Awards at Dolby Theatre on February 09, 2020 in Hollywood, California.  (Kevin Winter/Getty Images)

Others took to Twitter to express their disappointment with Eminem receiving a standing ovation while Elton John, who performed later in the evening, did not.

CLICK HERE TO GET THE FOX NEWS APP

"A standing ovation for Eminem but none for Elton f-----g John? THIS is an outrage. #Oscars," said one person.

"So the audience stands for Eminem but not Elton John?" asked another Twitter user, adding: "(Spoiler, both deserved it) #Oscars2020."

Said another person: "We live in a word [sic] where eminem got a standing ovation and elton john didnt. This doesn't sit with my spirit."