March 27, 2023 | 4:45pm

Selena Gomez and Zayn Malik’s alleged PDA-packed dinner date comes as no surprise to those who know them — because the pair has hooked up in the past.

The singers’ first tryst happened “way back” in the day when Gomez’s best pal, Taylor Swift, was dating Malik’s former One Direction bandmate Harry Styles, Page Six is told.

Swift, now 33, and Styles, now 29, got together in the fall of 2012 and were first photographed that December.

They called it quits the following month.

But it seems their short-lived fling was enough to lead Gomez and Malik to try their hand at romance, as a top music industry source tells us: “They had a thing years ago, when Taylor and Harry were dating.”

selena gomez and one direction on stage at the 2013 VMAsSelena Gomez and Zayn Malik hooked up years before their alleged recent PDA-packed date night, we’re told. FilmMagic

The insider continues, “It doesn’t surprise me at all that they’re potentially together [today].”

A hostess at a celebrity-loved Soho eatery set the internet abuzz when she said she witnessed Gomez and Malik, both 30, locking lips while at the establishment earlier this month.

Klarissa Garcia, the hostess’ friend who made a TikTok video about the alleged encounter, told Page Six on Friday, “No one noticed them [in the restaurant]

“It was pretty public but … no one really cares about famous people in New York.”

harry styles and taylor swiftThe insider tells us the musicians “had thing” in 2012 when Taylor Swift and Harry Styles were dating.GC Images taylor swift and selena gomez huggingGomez and Swift have been best friends for years.Kevin Mazur zayn malik and harry stylesMalik and Styles were in the mega-famous boyband One Direction together. FilmMagic

Despite being relatively private people, Gomez and Malik didn’t seem to care about keeping things low-key.

We’re told they were openly kissing at their table, which happened to be in the center of the busy restaurant.

For more Page Six you love … Listen to our weekly “We Hear” podcastSubscribe to our daily newsletterShop our exclusive merch

Garcia’s TikTok included a screenshot of her conversation with her hostess friend, who claimed in text messages, “Tell me how Selena Gomez and Zayne [sic] just walked into [blurred out restaurant] hand in hand making out and I seated them.”

selena gomezGomez and Malik were allegedly seen kissing at a popular NYC eatery earlier this month.Instagram/Selena Gomez zayn malik“No one noticed them,” an eyewitness said of the alleged encounter.zayn/Instagram

Romance rumors between the pair started swirling before their alleged NYC date night, as Malik — who only follows 18 people on Instagram — became one of Gomez’s 403 million followers.

The One Direction previously dated Gigi Hadid, who dumped him in October 2021 after he was accused of striking her mom, Yolanda Hadid, during an explosive argument.

Malik has denied the allegations and continues to co-parent 2-year-old daughter Khai with Hadid while mainly staying out of the public eye.

gigi hadid and zayn malikMalik shares 2-year-old daughter Khai with ex Gigi Hadid.Gigi Hadid/Instagram selena gomez and justin bieberThe “My Mind & Me” singer dating Justin Bieber on and off for eight years.WireImage

Gomez, for her part, has dated a slew of famous men throughout her career, but was most famously in an on-again, off-again relationship with Justin Bieber for eight years before he married his wife, Hailey.

Last week, the “Only Murders in the Building” star asked fans to stop sending death threats to the 26-year-old model amid their ongoing feud, which has played out on social media over the years.

Reps for Gomez and Malik did not immediately return Page Six’s request for comment.