Katy Perry, Lionel Richie join hands in prayer with American Idol contestant

Samantha Diaz led the judges in prayer(Photo: ABC)

A New York City subway singer hoping to be the next winner on "American Idol" took a moment during her nerve-wracking audition to put the spotlight on God.

During the audition, Samantha Diaz, who goes by the stage name of "Just Sam", plucked up the courage to lead the panel of judges - Katy Perry, Lionel Richie and Luke Bryan - in prayer.

"I have a prayer I want to do with you guys. So repeat after me," she told the judges, before praying, "Heavenly Father, Lord make my life brand new right here, right now, with my friends and my new fam."

The judges were happy to go along with the prayer, with Bryan joking afterwards that he wanted to get baptised. 

Perry, who was a Christian singer before going mainstream, shouted, "We've been saved again!"

It was a happy ending to the audition, which had at times been emotional as Diaz shared her story of being adopted by her grandmother after being abandoned by her parents. 

In a moving account of her life until now, the 20-year-old said she was earning money by singing in the New York subway. 

She told the judges that being on "American Idol" would "change her life" before she started her performance of "You Say" by Christian singer Lauren Daigle. 

The emotions overwhelmed her and she wasn't able to complete the song, but that didn't stop the judges praising her talent. 

"This is really, really important, what you have, in my opinion," Bryan told her.

"A lot of people come in here and they haven't lived the struggles you have. You have those qualities in your voice to tell stories and you can sing really beautifully too."

Perry agreed, saying, "I love your sweet personality. You do have a really good voice. Remember where you came from and sing to where you want to go."

In a second attempt, she chose Andra Day's "Rise Up", which she managed to finish. 

Richie complimented the young singer, saying, "I'm so grateful that God put you in front of us."