Who run the world? Girls!

The ladies of "American Idol" proved it during Wednesday's (May 25) season-closer when they performed a medley of Beyoncé hits, and were joined at the finish by Beyoncé herself.

The girls — Pia Toscano, Karen Rodriguez, Naima Adedapo, Ashthon Jones, Thia Megia and Haley Reinhart — hit the stage in various red-and-black ensembles and shared the stage during B's #1 smash "Single Ladies (Put a Ring on It)." Adedapo opened the song and threw some sass on it before passing the mic to Jones, the season's 13th-place finisher, who was eliminated during the first week of semifinals competition. The girls took their turns with the vocals and aped the familiar moves from the single's iconic video, which one rapper sort-of semi-famously referred to once as one of the greatest music videos of all time.

Megia and the frequently bilingual Rodriguez took center stage and duetted on "Irreplaceable," another #1 hit for Beyoncé, while the rest of the group chimed in on the "you must not know 'bout me" chorus. That transitioned into "Get Me Bodied," with each singer working the stage with maximum 'tude. "If I Were a Boy" was next, with the contestants sitting down on the side of the stage and Reinhart tackling the chorus with her big, growly vocals. Jones was also allowed to flex her muscles on the song, and Toscano soon took center stage as the song segued into "Déjà Vu." Toscano, frequently criticized during her "Idol" run for only attempting big, old-fashioned ballads, came off well during the uptempo song.

But then the Queen B herself hit the riser at the top of the stairs and showed the ladies a thing or two about being a diva. The big horns from "Crazy in Love," her first solo hit, signaled her arrival, and she hit the stage with an abundance of style and authority. She danced in a long line with the "Idol" ladies (and a few backup dancers to boot) and ran through a verse of the song, strutting across the stage and whipping her hair like a true star. The performance ended with the "Idol" gals wrapping their arms around Beyoncé in a big group hug, and without even performing her new single, Beyoncé showed that girls run the world, or at least the "Idol" stage.

Later in the show, Beyoncé returned to debut her new song, "One Plus One." She introduced the dramatic piano-led ballad as her "favorite" song, and sang it on a sparse, smoke-filled stage, dropping to her knees at one point and shaking hands with the fans gathered in front of her.

What did you think of the Beyoncé medley? Let us know in the comments!

Don't miss a special edition of "Idol Party Live" Thursday at noon on MTV.com for analysis, finale red-carpet coverage and the last "Idol in 60 Seconds" of season 10. Get in the conversation by tweeting with the hashtag #idolparty! In the meantime, get your "Idol" fix on MTV News' "American Idol" page, where you'll find all the latest news, interviews and opinions.