A state trooper assigned to Gov. Andrew Cuomo’s security detail got hot and heavy with one of New York’s first daughters — and was soon transferred to a post near the Canadian border, The Post has learned.

Trooper Dane Pfeiffer, 35, met Cara Kennedy-Cuomo, 25, through his job as one of her dad’s bodyguards, sources said.

They began dating about seven months ago — after she moved into the Executive Mansion in Albany because of the coronavirus pandemic — and Cuomo learned about the relationship a short time later, sources said.

Pfeiffer’s relationship with Kennedy-Cuomo mandated his removal from her dad’s protective detail due to “the protocol of dignitary protection,” according to a law enforcement source familiar with the matter.

CHELSEA HANDLER SAYS GOV. ANDREW CUOMO GHOSTED HER AFTER AGREEING TO A DATE

On May 24, Pfeiffer requested a “voluntary transfer” to Troop B in northeastern New York, a state police spokesman said. Pfeiffer began his career there after graduating from the State Police Academy in 2015, records show.

Cara Kennedy-Cuomo attends the Chiara Boni front row during New York Fashion Week.  (Photo by John Lamparski/Getty Images for NYFW: The Shows)

Cara Kennedy-Cuomo attends the Chiara Boni front row during New York Fashion Week.  (Photo by John Lamparski/Getty Images for NYFW: The Shows)

“He was transferred to keep him away from the daughter because the governor didn’t like whatever they were doing,” a source familiar with the situation said.

The move failed to cool the couple’s ardor and Pfeiffer routinely returns to the Executive Mansion to pick up Kennedy-Cuomo for dates, further upsetting the governor, a source said.

Pfeiffer wasn’t found to have committed misconduct and his transfer to a state police station in Plattsburgh — about 160 miles north of the state capital, and about 25 miles south of the Canadian border — didn’t go on his record as official discipline, sources said.

But records show that Pfeiffer bought a house in Saratoga Springs, near Albany, in 2018 and the dramatic change in his commute is considered a type of informal punishment that cops call “highway therapy,” sources said.

Cuomo “is limited in how much he can screw with him, so highway therapy is one of his few options,” a source said.

Pfeiffer declined to comment when contacted by The Post, but a state police spokesman claimed Pfeiffer requested the transfer back to Troop B “to gain more field experience to further his career advancement track to the rank of sergeant.”

“Such requests are routine, and it was granted,” spokesman William “Beau” Duffy added.

Cuomo spokesman Rich Azzopardi said that “the governor had nothing to do with the transfer — it was requested by the trooper.”

Cuomo’s apparent disdain for Pfeiffer runs counter to the “advice to fathers” he gave during a news conference in April while discussing family dinners amid the coronavirus lockdown that included Tellef Lundevall, the boyfriend of Cara’s twin sister, Mariah Kennedy Cuomo.

“The answer on what you think of the boyfriend is always, ‘I like the boyfriend.’ Always,” he said.

New York Gov. Andrew Cuomo removes a mask as he holds a news conference in Tarrytown, N.Y. (AP Photo/Mark Lennihan, File)

New York Gov. Andrew Cuomo removes a mask as he holds a news conference in Tarrytown, N.Y. (AP Photo/Mark Lennihan, File)

In an ironic twist, Cuomo even outlined the peril of rejecting a daughter’s choice of boyfriend, which he said triggers so-called NDS, or Natural Defiance Syndrome.

“It’s not documented, but it is a psychological condition where if you say as a father, ‘I don’t like him,’ Natural Defiance Syndrome kicks in and then they like the boyfriend more because he is opposed by the father.”

CLICK HERE TO GET THE FOX NEWS APP

But Cuomo may have grudgingly come to accept the relationship, based on remarks he made during a radio interview last week when host Alan Chartock noted that his two other daughters — Mariah and Michaela Kennedy-Cuomo, 22 — had “flown the coop” since the pandemic eased.

“Cara has been with me, she just did the [Law School Admission Test] and she’s going to do the [Graduate Management Admission Test],” he said.