The Sister Act star hit the stage of the New Amsterdam Theatre in New York last week (ends22Jan17) dressed up as the Genie, complete with velvet blue jacket, matching harem pants and pointed slippers, sending the audience wild.

After rising up from a hole in the stage, Whoopi was joined by the show's current Genie, James Monroe Iglehart, who wore the same outfit and bantered onstage with her while Adam Jacobs, who plays Aladdin, looked on in mock surprise. The Genies also took a selfie onstage and reportedly performed Friend Like Me together.

"Last night I had A LOT of fun making a brief surprise visit as Genie in Aladdin - The Musical," she wrote on Facebook next to the selfie. "Thank you Disney and James Monroe Iglehart (you, my dear, are one talented, talented, talented sensation!) and the entire cast and crew! You made me feel right at home - thanks for letting me play!"

Her cameo was filmed as part of a segment for her U.S. talk show The View in which she goes behind-the-scenes of the production with Tony Award-winning Iglehart, who leaves the show in February (17) to star in acclaimed hip hop musical Hamilton.

He will be replaced by Major Attaway, who has served as the standby since early 2016.