Fifth Harmony were almost sent home last week on 'X Factor' -- but tonight (Dec. 12), Simon Cowell's girls made a strong case for their spot in the finals with a performance of Ellie Goulding's 'Anything Could Happen.'

"Girls, look -- we're not gonna kid each other, you come into this competition tonight as underdogs," acknowledged Cowell during the show. "To get into the finals is going to take a miracle, because of who you're up against. But just like the lyric of that song, anything could happen."

Fortunately for Fifth Harmony, tonight "anything" included a surprisingly layered arrangement of the Goulding song, one which made room for loads of harmony while allowing each of the ladies time for solo turns at the mic. They also came prepared with a cool, quirky stage design, opening the song sitting in formal wear at a party table with a cake and balloons before opening things up with some subtle work by the background dancers.

They may have undermined it with an underwhelming performance of Shontelle's 'Impossible' later in the episode, but for a few minutes, Fifth Harmony looked like finals-ready contestants. Their main judges' table nemesis, L.A. Reid, was impressed, calling it "The very best vocal performance you've ever done" -- and he had plenty of company. Britney Spears told them "I loved everything about it -- it was like magic when you guys got up there," while Demi Lovato chimed in, "I think the dresses, everything -- it was so cute, and you pulled out the little sparkle that I think you guys need sometimes."