LOS ANGELES —  Joking around in a sit-down interview in a Los Angeles hotel suite, Zach Galifianakis quipped that “of course” he thinks he’s responsible for his “Keeping Up With the Joneses” co-star Jon Hamm having a comedic career.

After all, the two actors have been close pals for more than 15 years — during a time when both men’s Hollywood images catapulted to star status.

Quickly the “Hangover” star recanted and admitted — with Hamm laughing, sitting next to him — that “no, I’m not responsible for anything that Jon has done!”

The easy banter was proof that the two were good friends long before the cameras rolled on “Keeping Up With the Joneses” (opening Friday), and Galifianakis said, “That foundation of friendship made the on-camera chemistry so much easier to achieve — because we already had good chemistry.”

In the film, Galifianakis and Isla Fisher play a so-called “normal” suburban couple with kids, who become increasingly curious about the nature of the couple portrayed by Hamm and Gal Gadot (the “Joneses” in the title) who suddenly move into their cul-de-sac. In fairly short order, Galifianakis and Fisher learn that Hamm and Gadot are, in fact, highly trained government spies and are pulled into an international espionage plot.

Since “Joneses” is an out-and-out comedy, Hamm noted, “I’ve always said about my comedic ability: I’m very good at standing next to funny people, which I’ve done successfully during the majority of my career — whether it’s with Zach in this film, or Kristen Wiig or Tina Fey.

“It’s nice to stand next to very funny people and not ruin it. That’s what I’m always going for.”

Supplementing the comedy are some intense action sequences. “It takes forever to do that,” Hamm said. “There are so many little moving parts that you just have to get absolutely right, if you’re going to make it believable. But, at the end of the day, it’s really fun to do.”

Galifianakis jumped in to point out that in a lot of the car chase scenes, “Jon did most of the driving,” leading his friend Hamm to joke, “A lot of the fear you see in Zach’s eyes is totally real.”

“Yes,” added Galifianakis, “There are a few shots in the film where it’s clear to me that I’m not acting there. That was pure fear! I’m not THAT good of an actor!”

Considering the underlying setup of the film’s premise — suspicion of the new neighbors — it seemed appropriate to ask both men if they had ever had a similar reaction in real life. Ever been suspicious of mysterious neighbors?

“We both lived in New York for a while,” said Hamm. “There’s definitely a cast of characters in New York, when you live in a building where you have a real eclectic mix of people living near you in close proximity. There would be times, you’d think, ‘Gee, what’s going on behind apartment door No. 3 over there? Whatever odor that’s coming out of that place just smells wrong!'”

Hamm’s quip inspired Galifianakis to improv alongside him, adding, “That’s so right. In New  York apartment complexes you always walk by a door that smells like soup!”

“And not good soup,” zinged Hamm. “No, it’s the smells of old, cream-based soup. Cream of socks.”

Galifianakis laughed and smiled. “See, as I said, I’m not responsible for anything Jon has done — or says!”