Beyonce helped her husband Jay Z bring his residency in Brooklyn, New York to a close in superstar style on Saturday (06Oct12) by joining the hometown hero onstage for a surprise performance.

The Empire State of Mind hitmaker kicked off his eight-night residency at the new Barclays Center sports arena last month (28Sep12) and has played the majority of shows completely solo - except for one-off appearances by rap pioneer Big Daddy Kane and Jay Z's longtime sidekick Memphis Bleek.

However, he decided to give the crowd an extra special treat for the final show and sent fans into a screaming frenzy as he welcomed Beyonce into the spotlight after playing their hit collaboration '03 Bonnie & Clyde.

Jay Z cleared the stage for the R&B beauty as she and a group of backing dancers took over to perform Diva and another of their duets, Crazy in Love, with the hip-hop icon playfully spanking his wife's backside towards the end of his verse.

But the man of the moment almost missed his cue for the track, later admitting to the audience: "I was watching (Beyonce) on the monitor in the back and then I was like, 'Oh s**t, I should probably rap here!'"

He then suggested it had been his plan all along to share the stage with his wife on his last night: "Of course I had to let Bk (Beyonce Knowles) touch the stage in Bk (Brooklyn)."

Jay Z went on to play songs like Big Pimpin', Izzo (H.O.V.A.), Dirt Off Your Shoulder and Excuse Me Miss, before joining forces with Beyonce once more during the finale to wrap up the show with Young Forever.

The final Barclays Center gig, which marked Beyonce's first public performance in Jay Z's native Brooklyn, was streamed live online via the rapper's new YouTube.com channel Life+Times.