King Charles III and Queen Camilla’s unexpected cameo during Sunday’s “American Idol” was almost as big a surprise for Ryan Seacrest as it was for everyone watching.

Following Sunday’s new episode of “Idol,” Seacrest spoke with ET’s Denny Directo, and explained how quickly the high-profile cameos came together.

“I have to tell you, I was driving in and my phone rings and it’s the executive producer and she says, ‘Well, we’ve got some news,'” Seacrest shared. “I thought maybe something happened [with a contestant]. She said, ‘Well, the king and the queen are going to make an appearance!'”

“I said, ‘This is so great. How?’ ‘Well I don’t know. They’re just gonna figure it out when Lionel and Katy are in some room in Windsor Castle,'” Seacrest continued, referring to “Idol” judges Lionel Richie and Katy Perry, who are in England after performing at the Coronation Concert.

Charles and Camila’s surprise appearance on the long-running singing competition series came at the start of Sunday’s show and just hours after Perry and Richie’s performances at the historic event.

Andrea Bocelli On Which Song King Charles Requested for Coronation

Tom Cruise Says King Charles ‘Can Be His Wingman Anytime’

Katy Perry’s Coronation Concert Set Gets Princess Charlotte Singing

Lionel Richie Performs at King Charles’ Coronation Concert