“Do you guys smell gas? It’s pretty intense,” she asked Bryan, 43, and Richie, 70.
“We’re getting heavy propane,” Bryan told show producers as they called the local fire department.
“I have a slight headache from it,” Perry added, as she, Bryan and Richie stood up to leave the studio.
At the same time, a young girl’s time on stage was cut short and production crew and contestants were evacuated.
“Oh, it’s bad. It’s really bad,” Perry said.
Firefighters and medical teams in ambulances arrived on the scene as the judges gathered outside with the production team.
“This is not a joke, there really is a gas leak,” Bryan said.
“I’m not feeling good,” Perry admitted as she tumbled to the ground in front of her fellow Idol judges.
After she stood up, the singer joyfully hugged a firefighter saying: “You saved me!”
The incident aired on Sunday’s episode of the ABC show, but was actually filmed last year.
After it aired, Perry took to Twitter to share a video of her embracing the firefighter. In the clip, she, Bryan and Richie are also seen singing and dancing with three firefighters following the gas leak scare.
“Big shout out to all of our first responders around the country – thanks for risking your lives every day…and ? all night long ? #AmericanIdol ??,” Perry captioned the video.