Video from the official Oscars YouTube channel. All rights belong to AMPAS.

In an awards show that was mostly predictable, Ryan Gosling delivered a jolt of pure Ken-tertainment to the Oscars presentation.

Gosling performed his song “I’m Just Ken” from the Barbie movie, which was one of the contenders for Best Original Song at Sunday’s ceremony. And though the Oscar statuette ultimately went to Billie Eilish and her brother Finneas O’Connell for their song “What Was I Made For,” also from Barbie, Gosling’s performance was arguably the highlight of the entire ceremony.

While Gosling’s participation in the ceremony was only confirmed a few weeks before the ceremony, producers revealed to Variety that Gosling’s participation had been a lock for months.

“Ryan Gosling is a true professional, that man — we met with him on Zooms months ago, talking about that performance,” Molly McNearney, who produced the show with Raj Kapoor, Katy Mullan and Rob Paine, told Variety.

Choreographer Mandy Moore, who worked on Taylor Swift’s Eras tour and who has won several Emmys for her choreography work on So You Think You Can Dance, was in charge of designing the elaborate song-and-dance extravaganza, the thematic elements were inspired by Gosling.

According to McNearney, it was Gosling’s idea to make the number a tribute to “Diamonds Are a Girl’s Best Friend,” performed by Marilyn Monroe in the movie Gentlemen Prefer Blondes.

Image courtesy ABC and AMPAS.

“That’s where the pink suit, and everybody else in black came from — and the stairs in the back. And we had an homage to the candelabra girls: We had Ken-delabra men,” said McNearney. The kiss on the cheek Gosling received was another nod to Monroe’s performance.

Gosling also suggested the brief Busby Berkley-style homage where the camera gets an overhead shot of him surrounded by Barbie heads.

Image courtesy ABC and AMPAS.

“He wanted to start in the audience, come up and see Mark [Ronson, who co-wrote the song], see Andrew [Wyatt, the other co-writer], ignite the Ken-delabras and then join the 10 dejected Kens on the stairs,” she said. “From there he wanted the rest of the number to evolve as if Kens were coming from everywhere, ‘Calling All Kens.’ Eventually ending in a huge celebration revealing Slash,” Moore told Variety.

Though Moore’s initial vision included having 100 Kens on stage, that was scaled back to 62, given the limitations of the stage area. Gosling’s co-stars from the film, Simu Liu, Ncuti Gatwa, Kingsley Ben-Adir and Scott Evans, joined him onstage to perform the street-fighting dance moves.

Gosling began singing from a seat behind Margot Robbie, his Barbie co-star, and Eilish, before going on stage to belt out the number (and karate chop a couple pink boards.) Then he returned to the audience, briefly sharing the microphone with Robbie, Barbie‘s director, Greta Gerwig, America Ferrera, who received a Best Supporting Actress nomination for her role in the movie, and Emma Stone, his La La Land co-star. This was another detail Moore and Gosling worked out together.

Image courtesy ABC and AMPAS.

The Barbie team had only two weeks to rehearse and only had time for one full number before the live performance. In addition to Slash, who had a searing solo during the song, guitarist Wolfgang Van Halen was on-stage.