Ryan Seacrest had to do a very quick underwear change during the season 20 finale of “American Idol” on Sunday due to an unexpected “anatomy” revealing wardrobe malfunction.

The host, 47, revealed all the details of what went down on Monday’s episode of “Live with Kelly and Ryan.” Apparently, Seacrest’s undergarments left little to the audience’s imagination. “America voted and said there was anatomy in the shot,” Seacrest quipped. “There was just panic about it, and we changed it.”

READ MORE: Kelly Ripa Shares Her Opinion Of Ryan Seacrest’s Girlfriend Aubrey Paige

Describing the experience as “a little embarrassing,” Seacrest said it was his stylist Miles Siggins who flagged the issue to the multi-hyphenate during a commercial break.

“We go to commercial and he says, ‘Can I tell you something? We need to change your underwear,'” Seacrest recounted. “I said, ‘What do you mean we need to change my underwear?'” Siggins explained the issue to Seacrest but there was just one problem: Ryan didn’t have a back up pair of underwear.

“‘Don’t worry, I got mine,'” Seacrest said Siggins told him, suggesting the two swap pairs. “He’s English, so he has shorter, tighter ones. They were tight, elastic underwear […] It was in the middle of a live show! We go backstage during the commercial and find a little corner and I’m literally taking off my pants, off my underwear, and putting his on.”

READ MORE: Kelly Ripa Pretends To Shave Off Ryan Seacrest’s Eyebrows On April Fools’ Day

Seacrest said that the experience was definitely a “first” for him. “Anything for [“American Idol”]. It’s a family show,” he added. “Thank you Miles!”

However, co-host Ripa felt there was a workaround that could have precluded the need for an underwear swap. “No, no, no,” she told Ryan in the on-air segment. “Change the camera shot! Crotch up! I would have said, ‘You get that camera and put it from here up.’ I’m not wearing Miles‘ panties.”

Though Ripa changed her tune as soon as she learned that the original pair of underwear that Seacrest wore were flattering. “It was enhancing?” she asked. “Well then I would have insisted they stay!”