The frontrunner in the New York City mayoral election has done the right thing by implying that he will end the NYPD's mass profiling of Muslims.

Bill de Blasio, the Democratic contender, has hinted that the expensive, fruitless dragnet that the city police has laid out for more than a decade will be nixed when he assumes office.

"The efforts of surveillance have to be based on specifically specific information, and obviously you need to go through a careful vetting process," he said at a recent rally, adding, "Not only are we going to be safe, but we're going to be safe in a manner that is, again, consistent with our values and our Constitution."

The program in question here is a mass spying operation that the NYPD has been engaging in since 2002 that involves numerous informants, the mapping out of Muslim residents in the city, the infiltration of mosques in the region, lots of picture- and video-taking, and the use of huge computer databases.

The program has been such an embarrassing overreach that the city denied earlier this month in court that it even existed.

"I 100 percent disagree that there was ever a Muslim surveillance program," city lawyer Peter Farrell said before a Brooklyn court testifying in a lawsuit brought by the ACLU.

Not only has the surveillance been ethically, morally, and constitutionally dubious, it has also been counterproductive.

"The NYPD's unlawful profiling of Muslims has damaged its relationship with American Muslims, breaching communities' trust in a police department that is tasked with protecting them," the ACLU notes.

And it has been worthless, yielding no information even when the city was actually under threat, such as when Najibullah Zazi, a young Afghan immigrant, plotted to blow up the subway system.

"New Yorkers had no idea they were paying for something that, at the most important moment, had proved useless," Pulitzer Prize-winning AP reporters Matt Apuzzo and Adam Goldman write in "Enemies Within." "Nobody asked whether such programs were worth continuing."

De Blasio has uttered welcome words, but he hasn't yet given details about how he'll roll back the spying operation.

"No candidate, for instance, has yet stated any intention to ax the NYPD's deputy commission of intelligence, thirty-five-year CIA veteran David Cohen, who created the program," noted New York magazine last month. "Few believe that any major changes are coming as long as he remains at the helm."

In his recent comments, de Blasio did not mention Cohen.

At a time when budget issues are constraining even the most worthy programs, monetary concerns are reason enough alone to terminate the mass spying. As Apuzzo and Goldman reveal in their book, the surveillance effort has been a complete waste.

"As a young detective in the Bronx, [NYPD Lieutenant Hector] Berdecia had worked the streets, building informants and dismantling violent drug gangs," the book states, in a summary published by New York magazine. "Yet his rakers [informants] spent their days sipping tea in cafés."

And Berdecia soon found out that his underlings were literally gorging themselves at taxpayers' expense.

"One frequent destination was the Kabul Kabob House in Flushing, Queens," Apuzzo and Goldman write.

"When Berdecia asked officers whether they suspected a threat that should be reported up the chain of command, he was told they were conducting routine follow-up visits. But a look at the reports showed nothing worth following up. That's when Berdecia realized that, in the hunt for terrorists, his detectives gravitated toward the best food."

This was how much of a bad joke the surveillance program was. Bill de Blasio should do us all a favor and put the kibosh on it once he is in the mayoral seat.

Photo: Flickr user Viktor Nagornyy, creative commons licensed.