Slash and Wolfgang Van Halen joined forces with Ryan Gosling for a rousing rendition of “I’m Just Ken” at the 96th Academy Awards.

The song, from the hugely successful motion picture Barbie, was nominated for Best Original Song at the event. Producer Mark Ronson, who was also part of the night's ensemble performance, wrote the song alongside Andrew Wyatt, with Slash and Van Halen each contributing guitar to the track.

For the Oscars performance, Gosling and Ronson got the tune started, with the Hollywood star donned all in pink as he belted out the vocals. Roughly two minutes into the rendition, the top-hatted Guns N' Roses rocker appeared seemingly out of nowhere, blazing through massive riffs before helping "I'm Just Ken" hit its triumphant climax. Van Halen, meanwhile, played rhythm guitar and stayed out of sight for much of the performance, only appearing on screen towards the end.

The performance was a highlight of the ceremony and brought the Hollywood crowd to its feet for a massive ovation.

Watch the Performance of 'I'm Just Ken' at the Oscars 

How Did Slash and Wolfgang Van Halen End up on 'I'm Just Ken'?

“Slash is my hero,” Ronson revealed to Variety around the time of the song’s release. "I was, what, [in] seventh grade when Appetite for Destruction came out. He's my all-time hero. I had pictures of Slash all over my walls. So when we were getting near this song being done, I was like, 'It never hurts to ask.' It seems like such a long shot."

READ MORE: The Best Rock Movie From Every Year

"I sent him the song and he was like, 'This is a good song,'" Ronson said. "I [didn't] know Slash that well before this, and he was like, 'Cool, I'll play on it.' And he was so cool. He killed it. He plays the solo at the end and the rhythm parts. It's wonderful."

Ronson also reached out to Van Halen, who excitedly joined the project.

"My buddy Mark Ronson hit me up earlier this year needing my 'mammoth guitar sound' and I happily obliged," Wolfgang explained via social media. "If anyone is curious about specifics, I have a lot of textural stuff throughout the film with two major spots where I do some soloing. One in particular is pretty cool because it's the big song that Ryan Gosling sings and Slash plays on it as well!" He also noted "a specific moment in this song that's only in the movie where l've got this fun solo with some tapping and stuff."

Rock Stars Who Have Won Oscars

Gallery Credit: Corey Irwin

More From Ultimate Classic Rock