John Corbett gets a lot of love on the set of his FX show “Sex&Drugs&Rock&Roll.”

“I kissed him on the lips one day on the set just to screw with him,” Denis Leary revealed to Page Six during the ATX TV Festival this weekend.

He added, “There was no tongue. I just did it to surprise him. He was nice. He was a little cuddly, but it wasn’t fully gay. I thought it was great.”

The lip-lock was news to Corbett’s on-screen love interest, Liz Gillies.

“Really? Wait, I was not there for that!” she laughed.

Meanwhile, Gillies, 22, gets to film romantic scenes with Corbett, 55, who is most famous for playing Carrie Bradshaw’s boyfriend Aidan Shaw on “Sex and the City.”

Liz GilliesGetty Images

“I’m such a huge ‘Sex and the City’ fan … I’m obsessed with that show,” she said. “I will say, this year, I had a couple love scenes with Corbett and I was living in the city for the first time. I was just like holy f–king s–t, I feel like Carrie right now. I’m like in bed with Aidan, but then I was like, ‘No, it’s Corbett.'”

And in the war between Aidan and Mr. Big, both Gillies and Leary were on Team Big.

“I have to go Team Big because I knew Chris [Noth] before I knew John, but I haven’t kissed Chris,” said Leary, 58, who has been married to wife Ann for more than two decades.

Gillies added, “I’m Team Big, but Aidan’s great. I love Aidan.”

Season 2 of “Sex&Drugs&Rock&Roll” premieres June 30 on FX.