US rapper Eminem performs onstage during the 92nd Oscars at the Dolby Theatre in Hollywood, California on February 9, 2020.

Rapper Eminem gave a surprise performance at the 92nd annual Academy Awards Sunday, performing his hit "Lose Yourself" from the film "8 Mile" 18 years after it was nominated for and won an Oscar.

In 2003, "Lose Yourself" won, but Eminem did not perform or accept the award. Instead Luis Resto, who worked on the song with him, accepted the award on his behalf. It was the first-ever hip-hop track to win in the category.

Following the performance Eminem tweeted: "Look, if you had another shot, another opportunity... Thanks for having me [Academy]. Sorry it took me 18 years to get here."

Eminem Tweet

While it's unclear why Eminem performed at this year's Oscars, the performance enraptured the crowd. Celebrities sang along and bobbed their heads before giving him a standing ovation.

CORRECTION: This story was updated to show that Eminem sang "Lose Yourself" at the 2020 Oscars 18 years after it was first nominated for and won an Oscar.