Katy Perry collapsed on the set of "American Idol" and it was all caught on camera. Apparently, there was a gas leak at the set of the show in Sunriver, Oregon.

A Second Chance at Life

The incident aired on the latest episode of "American Idol" on Sunday on ABC, but it happened last year. 

After it aired, Katy Perry proudly shared a video of her embracing the firefighter who saved her. In the clip she posted on Twitter, she and her fellow judges Luke Bryan and Lionel Richie could be seen singing and dancing with three talented firefighters following the scare of a gas leak. 

"Big shout out to all our first responders around the country -- thanks for risking your lives every day and all night long... #AmericanIdol ," Perry captioned the video. 

Looking back, Katy along with everyone who was present in that studio could not help but feel blessed to have been saved from what could have been a huge disaster. The video of her with the first respondents to the scene showed how grateful everyone was, especially Perry. 

Perry felt that she was given a second chance at life and all for the bravery of the firefighters who first responded to the scene. 

Looking Back

The judges -- Katy Perry, Luke Bryan, and Lionel Richie -- were in the middle of filming the auditions when they smelled gas in the building. 

"Do you guys smell gas?" The smell is pretty intense," Perry asked Bryan and Richie. 

"Were getting heavy propane," Luke Bryan told their producers before the firefighters arrived at the scene. 

"I have a slight headache from it," Perry added. All three of them stood up from where they were and decided to leave the studio as they could no longer take the smell. 

At the same time, the young girl who was auditioning at the time had to be escorted out. The production crew and the contestants were immediately evacuated.

"Oh, it's bad. It's really bad," Perry added. 

Firefighters and medical personnel arrived on the scene in ambulances while the judges were gathered outside with the rest of the production team. 

"This is not a joke. There really is a gas leak," Bryan said. 

"I'm not feeling very good," Perry said before she tumbled to the ground beside her fellow "American Idol" judges. 

When she was able to stand up, she joyfully hugged a firefighter and said "You saved me!"

Unsung Heroes

The first responders quickly took action upon arriving at the scene. It is their job to ensure that everyone is safe ground. Then, they risk their lives to ensure that the situation is properly dealt with -- with as little to no casualties.

The gas leak in the set of "American Idol" was one of the situations where a lot of people could have been dangerously hurt if not for the first responders. The post that the Katy Perry made as a shoutout to these first responders sent a positive message to everyone. 

It always pays to be thankful for the little miracles that random people do for you. 

READ MORE: Demi Lovato: Battling Over Her Mental Health Condition [VIDEO]