It’s hard to find a more dishonest piece of rhetoric than Ted Cruz’s praise of the NYPD’s discredited, if not miscredited, Demographics Unit.

While his GOP rival Donald Trump shoots from the hip and often doesn’t know what he is talking about, Cruz’s misrepresentations about the now-disbanded unit seem calculated for political effect.

In a Daily News op-ed last week, he conflated NYC with the Belgian section of Molenbeek. Because of Belgium’s lax law enforcement, terrorist plots were hatched and terrorists could seek sanctuary there.

Seeking to prevent that in NYC, former Police Commissioner Ray Kelly and David Cohen, a former CIA deputy director whom Kelly appointed NYPD deputy commissioner for intelligence, created what Cruz described as “a counter-terrorism unit that tracked demographic trends . . . to provide investigators with important information about where terrorists might congregate and recruit.”

That was the Demographics Unit, a seven- or eight-officer group that Kelly spokesman Paul Browne denied ever existed.

Because Cohen made the unit so secretive, its mission has become a touchstone, representing whatever the beholder believes it to be. Some see the unit as inconsequential for having produced no arrests, Others view it as shorthand for the NYPD’s spying operation.

No one in the NYPD disputes the unit’s importance, at least in theory. It was, in perhaps the only accurate sentence in Cruz’s op-ed: a unit to map the city and describe the character of its Muslim neighborhoods — its mosques, schools, coffeehouses and restaurants.

Cruz, however, glommed on to one of the department’s greatest no-nothings, Mitchell Silber. A former civilian analyst, Silber claimed the unit was responsible for thwarting the Herald Square subway plot. He is the only NYPD official to claim the unit played such a role. In fact, in 2012, then-Assistant Chief of the Intelligence Division Thomas Galati testified in a deposition in a federal civil rights case that the unit never produced a lead that led to a terrorism probe.

As for the unit, Kelly cut it to two or three detectives after negative publicity. Police Commissioner Bill Bratton discontinued the unit, saying it served no useful purpose. But Cruz insists Bratton and Mayor Bill de Blasio abandoned it out of political correctness.