American Idol’s season 12 is history, and its finale featured several celebrity appearances, many with duet performances.

While Mariah Carey sang a medley of Hero, We Belong Together and Beautiful, Jennifer Lopez and Pitbull paired together for a performance of Live It Up. Judge Keith Urban sang Little Bit Of Everything, with The Band Perry delivering their single Done and Franki Valli performing Can’t Take My Eyes Off You.

Psy belted out his new single Gentleman and Adam Lambert sang a duet of Titanium with Angie Miller. While Jennifer Hudson performed Inseparable with season 12 winner Candice Glover, finalist Amber Holcomb paired with Scottish singer Emile Sande with the song Next To Me. The top ten finalists performed The Wanted’s Glad You Came, with the top five males singing Let’s Hang On (To What We’ve Got).

Aretha Franklin appeared on satellite, and the top five females sang a medley of her greatest hits.

The finale included a tribute to Randy Jackson, who will be leaving American Idol after being with the singing competition for 11 years. The judge will be leaving to focus more on his record label and other business ventures. Ryan Seacrest spoke about the “many great memories" Jackson left in the several seasons of the show, according to Radar Online.

Candice Glover became the 12th American Idol winner on Thursday night, after she was outnumbered by votes against runner-up Kree Harrison.