Demi and the all-girl group--Ally Hernandez, Camila Cabello, Normani Hamilton, Dinah Jane Hansen and Lauren Jauregui--rocked the stage, even impressing judge Simon Cowell.
Simon commented, "Demi Lovato, you were sensational. That was pop perfection."
Fifth Harmony also performed "Anything Could Happen" and "Let It Be" during the X Factor live performance finale.
Fifth Harmony tweeted after the show: "AHHHHHH! We love @ddlovato! That was so much fun! SHE IS PERFECT!"
The love was mutual, as Demi tweeted: "@camilacabello97 @LaurenJauregui @AllyBrooke @dinahjane97 @NormaniKordei thank you SO much for letting me sing with you!! you're amazing!!"
Who will win X Factor season 2? Fifth Harmony, Carly Rose Sonenclar or Tate Stevens?