Click to email this to a friend (Opens in new window)

Click to share on Twitter (Opens in new window)

Click to share on Facebook (Opens in new window)

Joe Perry, the legendary guitarist of the band Aerosmith, collapsed during a concert with his side project in Coney Island on Sunday night, police sources said.

The 65-year-old rocker was playing alongside actor Johnny Depp and frontman Alice Cooper with his super-group the Hollywood Vampires when he apparently went into cardiac arrest around 9:30 p.m, the sources said.

Perry was taken to Coney Island Hospital, where he was listed in stable condition.

Videos posted to social media showed him shredding on his guitar at the Ford Amphitheater at the Coney Island Boardwalk before he suddenly walked over behind a speaker and stumbled backstage.

Sources said he soon lost consciousness and police on the scene revived him.

“He had to sit on drum kit and then went behind a small wall and passed out,” a concertgoer wrote on Instagram, adding that “FDNY and NYPD carried him off quickly.”

People in the crowd told The Post the band was just two songs in when Perry collapsed.

“It was super quick. All of a sudden he just went down and then you can see EMTs everyone carrying him stage left,” said Danielle May, 31, of Manhattan. “They closed the bathrooms, everyone was frantic. [But the] show didn’t skip a beat.”

A clip posted by Instagram user @leeniepics shows them performing a cover of David Bowie’s classic “Rebel, Rebel” as EMTs carry the guitarist out on a stretcher.

At around 10 p.m., Cooper stopped playing and informed fans that Perry had not been feeling well.

“If you notice one of our brothers is not onstage with us, he was very sick before the show,” Cooper told the crowd, according to a Facebook user named AeroFANatic, who was at the concert.

The shock-rock legend took to Twitter after the show to update fans.

“Thanks to everyone asking about our brother @JoePerry. He is stable right now, with family & is under the best care,” Cooper said.

On Saturday, fans pointed out how Perry looked ill in a video posted to Facebook in which he promoted the concert at Coney Island.

“He looks like s***,” wrote Stephen Nicholas. “Wtf?”

Perry could be seen on Instagram warming up before taking the stage Sunday.

The Hollywood Vampires — a rock ‘n’ roll cover band which also consists of Guns N’ Roses bassist Duff McKagan and drummer Matt Sorum — were formed by Perry, Depp and Cooper in 2015.

Cooper had been an original member of the Hollywood Vampires drinking club, founded in the Roxy Hotel in 1972, and decided to name the group after it following a night of heavy drinking and jamming.

Fans and fellow rockers took to Twitter on Sunday night to send Perry well-wishes.

“Thoughts and prayers out to the great @JoePerry. Cmon man please be ok we love you love you love you!!!” tweeted former Rage Against The Machine guitarist Tom Morello.

“Sending nothing but good vibes,” wrote Twitter user @Im_Abe_Im. “He was revived but I hope everything turns out well for him.”

User @katielytle557 added, “Oh my god. Please let @JoePerry be okay. This is so scary I can’t stop crying.”

https://twitter.com/RealAliceCooper/status/752344377603792896/photo/1

Steven Tyler, Perry’s longtime Aerosmith bandmate and close friend, did not comment on his pal’s condition. He was expected to perform a solo show in Vancouver on Sunday night.

Additional reporting by Joe Marino