After 15 seasons, “American Idol” has come to an end. Fox's long-running singing competition show aired its series finale Thursday night, revealing whether La’Porsha Renae or Trent Harmon had earned the 2016 win.

Following several amazing duets and group performances, host Ryan Seacrest took to the stage for the last time to announce what everyone was waiting for: the 2016 “American Idol” winner. After bringing out La’Porsha and Trent, Seacrest revealed that America had voted Trent as the winner. Hugging La'Porsha, the emotional Mississippi native said:  “I worked so hard and I know I have a God-given ability."

Before Trent's big win, the two-hour finale paid homage to the show created by Simon Fuller. Many past contestants and judges returned to the “Idol” stage to perform and reflect on the series. The episode kicked off with La’Porsha and Trent singing with some of the other Season 15 contestants who were eliminated earlier in the season.

Season 1 host Bryan Dunkleman also made a guest appearance and joked with Seacrest that after the show finished he would be out of a job. Dunkleman also joked about the show struggling for another 14 years without him but then told Seacrest that he did an amazing job hosting it. Because Dunkleman was so nice, Seacrest let him bring out judges Jennifer Lopez, Harry Connick Jr. and Keith Urban.

La’Porsha and Trent took the stage again to perform Marvin Gaye and Kim Weston’s “It Takes Two.” Following their stellar duet, “Idol” alums came out to perform large group numbers and a few solos. Among the returning alumni were Jordin Sparks, Justin Guarini, Tamyra Gray, Chris Daughtry, James Durbin, Jennifer Hudson, Fantasia, Nick Fradiani, Carrie Underwood, Scotty McCreery, Katharine McPhee, Clay Aiken and Ruben Studdard.

Season 1 winner Kelly Clarkson also did a pre-recorded piece for the show where she sang a medley of her hit songs, including “Since You’ve Been Gone,” “Make A Wish,” “Because Of You,” “Stronger” and “Invincible.”

The “American Idol” judges also each took the stage to sing. Lopez debuted her new single “Ain’t Your Mama” before launching into “Let’s Get Loud.” Urban performed Stevie Nicks and Tom Petty’s “Stop Draggin My Heart,” and Connick did a sweet duet with a young singer.

The musical performances didn’t end there. “American Idol” paid tribute to David Bowie with a group performance by Phillip Phillips, Lee Dewyze, Nick Fradiani, David Cook and Kris Allen. Original judges Paula Abdul, Simon Cowell and Randy Jackson also returned to say goodbye.

Trent Harmon American Idol 2016 winner Trent Harmon was announced as the Season 15 winner of “American Idol.” Photo: Fox