Backstreet Boys member AJ McLean crashed the wedding of a megafan for a surprise performance on Sunday.

The epic cameo went down at the Atlantic City, New Jersey, the nuptials of Tyent USA CEO and founder Joe Boccuti and his songstress partner Rayna, who thought she was about to hear her own group, The FM Band, play her favourite Backstreet Boys song, “As Long as You Love Me”.

“You know, if you’re gonna do a Backstreet Boys song, I think you should have a Backstreet Boy [do it],” Joe can be heard saying in footage of the moment, which came after singer-songwriter Ryan Cabrera also pulled off a surprise performance.

Prior to hitting the stage, McLean, 43, filmed a clip explaining what he was about to do for a video posted on social media by Tyent USA, a water ionizer company, on Tuesday.

“Okay, so I am here in Atlantic City right now and I am about to crash my first wedding,” McLean said. “The bride is a massive, massive Backstreet Boys fan. Her favourite song is ‘As Long As You Love Me.’ So, nobody has a clue. I’m literally about to pop in in about 30 minutes and surprise the bride and groom.”

RELATED: Members Of Backstreet Boys & *NSYNC Finally Unite

McLean was then shown dancing up a storm in a hallway while waiting to crash the stage, where wedding-goers could be heard screaming and declaring, “No f***en” way” and “Shut up, shut up, shut up!” as he emerged.

“What’s up everybody?” McLean said, before taking a moment to greet the band he was about to take over.

McLean appeared to perform the song twice, once while the bride and groom sat on stage, holding hands and dancing in their chairs, and once with Rayna back on the dance floor as McLean serenaded her.

The “Love Song Love” singer also offered her his microphone, so she could showcase her own great vocals while singing along with him during the chorus of the 1997 hit. McLean also performed “I Want It That Way.”

The father-of-two was fresh from a Kentucky gig with his side project ATCK (All the Cool Kids), a group he formed with DJ Lux, which features rotating members including 98 Degrees’ Jeff Timmons, *NSYNC’s Chris Kirkpatrick and Montreal drummer Ryan Stevenson.

The Backstreet Boys star wasn’t the only surprise guest at the wedding, with Joe and Rayna taking to Facebook on Wednesday to discuss the amazing evening and other musicians who made a cameo.

RELATED: Backstreet Boys, *NSYNC & Boyz II Men At Las Vegas Engagement

“It was a surprise wedding, meaning she knew about it, but she didn’t know who was going to be there,” Joe explained. “We had some really cool guests there.”

“Ryan Cabrera opened up for us,” Rayna shared. “Then, later on, Rob Base came out and killed it and then AJ McLean from the Backstreet Boys also came out and just rocked the stage, let me sing with him. It was so much fun.”

The couple has been together for 21 years – “He was getting to know me!” says Rayna – and their wedding took place at a stunning waterfront location, where guests drank signature cocktails including Whiskey Lemonade and Orange Crush and wrote well-wishes for the newlyweds on personalized cornhole boards.

“Clearly the wedding of the century!” a Facebook user commented on Rayna’s new Facebook profile photo, which shows her dancing with Joe at the wedding.

McLean’s performance come just months after he surprised a pregnant fan with a seaside serenade in Santa Monica, California.