The Archie Comics gang have long had connections to the music world.

The fictitious band The Archies, which existed from 1968-73, turned out hit singles like “Sugar, Sugar” and “Jingle Jangle,” and in 2011 the Riverdale crew met up with rock icons Kiss.

Now Archie, Jughead and the rest of the crew are heading back to 1970s New York City where they meet Forest Hill’s legends the Ramones in a new one-shot comic, out Oct. 5, from writers Alex Segura and Matthew Rosenberg (no relation to this reporter) and artist Gisele Lagace.

“I’d been a big fan of the ‘Archie Meets Kiss’ book that Alex wrote, and I semi-joked with him about doing one for Ramones,” Rosenberg says. “Growing up, Archie was one of the things that got me into comics, and Ramones were one of the bands that got me into music, so it seemed like a no-brainer to me.”

It takes a little magical twist to send Archie and company back through time to 1970s New York, and when they arrive in the past, they get to see many parts of the city made famous by the punk band.

“If it’s mentioned in a Ramones song, I think it’s a safe bet,” Segura says. “The book is full of hat tips and Easter eggs. It’ll be a fun romp for Archie and Ramones fans alike.”

Rosenberg adds, “I grew up in New York going to [CBGB] and hanging out on the Lower East Side, so we definitely wanted to throw a bunch of that in there. But Ramones songs have lots of fun little places where The Archies can explore.”

Capturing the visual look of the Big Apple in that era fell to artist Lagace, who says she began her research watching the 2003 documentary “End of the Century: The Story of the Ramones.” She also used photo references, so many of the street scenes have an authentic look.

“I grew up on the Ramones, so they’re part of my teen years, and that stays with you forever,” Lagace says. “Bringing them into the Archie universe was fairly painless, to be honest. We all know that the core Riverdale gang play with The Archies, and that music is very important to them. It made sense for them to be in awe of the Ramones, and wanting to learn from them.”

And make sure you pay attention while reading the book: The authors sprinkled in special appearances by some familiar faces.

“There are plenty of cameos, too, which will be fun for music nerds like us to discover,” Segura says.

Having now met Kiss and the Ramones, there are still a number of bands that Rosenberg and Segura want to see The Archies run into.

“Oh man, there’s one in particular that I have my fingers crossed for,” Segura says. “I don’t want to jinx it. I’d love to write ‘Archie Meets Talking Heads.’ That would be amazing.”