A representative says Aerosmith guitarist Joe Perry is resting and "doing well" after he left a New York City stage and was taken to a hospital.

Perry, lead guitarist for the legendary band, collapsed while performing with another group Sunday night on Coney Island, according to multiple media reports and a video posted online.

Perry, 65, on stage at the Ford Amphitheater with Hollywood Vampires, a band that includes singer Alice Cooper and actor Johnny Depp, collapsed during mid-performance before being taken to Coney Island Hospital.

An administrator at Coney Island Hospital confirmed to The Associated Press that the 65-year-old Perry was undergoing tests.

Sujata Murthy, the band’s publicist, described Perry, in a statement early Monday as “stable and resting. His brother Vampires and fans wish him a speedy recovery.”

On his Twitter page, Cooper wrote late Sunday night that Perry was “with family & is under the best of care.”

advertisement | advertise on newsday

A video posted to an Instagram account shows Perry sitting in front of the drummer and appearing to have difficulty playing his guitar as Cooper and the rest of the band perform a version of the Spirit song, “I Got a Line on You.”

Perry then can be seen struggling to his feet before disappearing out of view behind the drum set.

A concertgoer who posted the video wrote on her social media account that Perry “went behind a small wall and passed out” as the rest of the band continued to play.

An NYPD spokesman said the agency could only confirm that a 65-year-old man collapsed at the Coney Island ampitheater and was brought to a hospital.

His condition was unknown. A spokeswoman for Coney Island Hospital confirmed that they had a patient named Joe Perry, but could not give details about his condition.

News of Perry’s collapse spread on social media with fans and fellow musicians alike expressing their support for the Rock and Roll Hall of Fame guitarist.

Tom Morello of the band Rage Against the Machine wrote on his Twitter account: “Thoughts and prayers out to the great Joe Perry. Cmon man please be ok we love you love you love you!!!”

— With Glenn Gamboa and The Associated Press