By Ruth Kinane
August 27, 2017 at 11:17 PM EDT
John Shearer/Getty Images

Katy Perry and Nicki Minaj closed Sunday’s MTV Video Music Awards with a slam-dunk performance of “Swish Swish” that included Perry singing from the top of a huge basketball while wearing a basketball corset and earrings.

Perry, who hosted the show, swung above the stage from a rope before joining a troupe of dancers wearing basketball net masks and matching netted tights. Minaj then joined her on stage in a referee costume.

As basketball balloons bounded from the roof, Perry flew above the audience on a wire before dancing atop a basketball hoop and ending the performance by dunking the ball — and then thanking the crowd.

“Of course I’m going to do it and go 100 percent,” Perry said earlier in the evening in a red carpet interview. “So, I’m going to do ‘Swish Swish’ tonight and of course I’m bringing out my special guest, Nicki Minaj. She came all the way from Miami.”

The show-stopping number capped a night of star-studded performances from the likes Ed Sheeran, Lorde, and P!nk, who performed a career-spanning medley before being honored with The Michael Jackson Video Vanguard award.

On Thursday, Perry dropped the video for “Swish Swish” which revolves around a basketball game and features a Rolodex of high-profile celebrities including Terry Crews, Molly Shannon, Stranger Things’ Gaten Matarazzo, and Hafþór Júlíus Björnsson a.k.a. The Mountain from Game of Thrones.

Perry’s album Witness is out now.