Former presidential candidate-turned-New York City mayoral candidate Andrew Yang nabbed an endorsement from the New York City Police Department (NYPD) captains union over a leading primary opponent who is represented by that union.

New York City Democratic mayoral candidate frontrunner Eric Adams was dealt a heavy blow in the race for his party’s nomination to replace outgoing Mayor Bill de Blasio when Yang was endorsed by the NYPD Captains Endowment Association.

The Captains Endowment Association (CEA) is the union representing past and current NYPD commanders. Adams, who was a captain in three different precincts – two in Brooklyn, one in Manhattan – is a member of the association.

In a Monday statement to Fox News, a spokesman for Adams’ campaign, Evan Thies, said that the Democratic mayoral frontrunner was sticking by his pledge to not take endorsements from any police unions.

ANDREW YANG’S NYC CAMPAIGN EVEN SHUT DOWN BY PROTESTERS

"Eric stated quite clearly he would not accept any PD union endorsements — and he even returned their contributions," Thies said. "So an endorsement by this union wasn’t an option."

Yang took home the NYPD captains union’s endorsement on Monday, with CEA President Chris Monahan saying in a press conference he respected the former presidential candidate for being willing to talk with law enforcement as police popularity plummets in the "City That Never Sleeps."

"Andrew and myself have had many conversations, talking about a lot of interests that particularly affect the city. Some of the conversations we agree on totally. Others we do not," Monahan said. "However, I do respect Andrew for a person who is willing to have a difficult conversation with, right now, a very unpopular profession."

Yang highlighted "public safety" as the "most important" issue facing the city at the moment and the division New Yorkers are seeing between civilians and the police "is threatening to destroy us."

CLICK HERE TO GET THE FOX NEWS APP

"If you have a mayor and a police force that are not on the same page, we are seeing the results right now," Yang said. "This is something we can change."

Yang also took a jab at Adams at the press conference, saying the captains union endorsing him over the former captain "tells you everything you need to know.