Demi Lovato may not always see eye to eye with Simon Cowell on The X-Factor, but she definitely supports the ladies of Fifth Harmony, the group Simon has mentored all the way to the show's finals.

During Wednesday night's final performances, country stars LeAnn Rimes and Little Big Town were brought in to sing with Carly Rose Sonenclar and Tate Stevens, but Fifth Harmony got a little help from right at home when their idol Demi joined them on stage for a performance of Give Your Heart a Break! AND it may have been just what the girls needed to prove that they've earned their spot in the top three!

Simon, Britney Spears and L.A. Reid all gave the number a standing ovation, which has not been common for Fifth Harmony throughout the show, as they've continuously fallen in the middle of the pack.

Related Article: Fifth Harmony Kick Off Their Shoes For the Hollywire Hot Seat!

The ladies gave Demi a warm welcome, announcing, “I literally can’t believe that I’m about to say this, but please welcome somebody we look up to so incredibly much, and she’s amazing, and I’m going to cry. Please welcome Demi Lovato!" They've have made it clear throughout the season that they're fans of Demi, having performed her songs twice even before this week.

After America's votes, the winner of X-Factor's second season will be revealed LIVE, tonight! Although Fifth Harmony had a big night on Wednesday, it's unlikely they'll be able to take the title away from Carly or Tate, who have shared the 1-and-2 spots on the leaderboard all season long. But, hey -- anything can happen!

Who do you think will win The X-Factor?