During Michael Bloomberg's three terms as mayor of New York City, the number of people detained under the NYPD's "stop, question, and frisk" (SQF) program skyrocketed from fewer than 100,000 in 2002 to more than 685,000 in 2011. The program was perennially controversial because it seemed to violate the Fourth Amendment and because it overwhelmingly targeted young black and Hispanic men. Bloomberg nevertheless was always a staunch defender of it—until yesterday, when he told the congregation of a large African-American church in Brooklyn he has seen the error of his ways.

"I was wrong," Bloomberg said in a speech at the Christian Cultural Center, "and I am sorry." The dramatic reversal may be the surest sign yet that Bloomberg is entering the race for the Democratic Party's presidential nomination. But it is transparently insincere, since he cannot offer a plausible explanation for his convenient conversion, aside from crass political considerations.

"I got something important really wrong," Bloomberg said. "I didn't understand…back then the full impact that stops were having on the black and Latino communities. I was totally focused on saving lives. But as we know, good intentions aren't good enough. Now, hindsight is 20/20. But as crime continued to come down as we reduced stops—and as it continued to come down during the next administration, to its credit—I now see that we could and should have acted sooner, and acted faster, to cut the stops. I wish we had, and I'm sorry that we didn't."

SQF's racially disproportionate impact was always one of the main complaints against it. The issue figured prominently in a federal judge's 2013 decision deeming the tactic unconstitutional as practiced by the NYPD. It is impossible to believe that Bloomberg took this objection to heart only recently. Even after U.S. District Judge Shira Scheindlin concluded that the program violated the Fourth and 14th amendments, Bloomberg continued to defend it.

Scheindlin found that police were commonly detaining, questioning, and searching New Yorkers without the "reasonable suspicion" the Supreme Court has said the Fourth Amendment requires. She also concluded, based on data showing who was stopped and what happened afterward, that cops were deciding who was suspicious based partly on race, thereby violating the 14th Amendment's Equal Protection Clause.

Scheindlin's analysis of data on 4.4 million stops from January 2004 to June 2012 strongly suggested that reasonable suspicion was the exception rather than the rule. During this period, she noted, only 12 percent of people subjected to the "demeaning and humiliating" experience of being treated like criminals were arrested or issued a summons. And although police were supposed to frisk a subject only if they reasonably believed he was armed, 52 percent of these encounters included pat-downs, only 1.5 percent of which discovered a weapon. Even when officers reached into people's clothing after feeling what they claimed to think was a weapon, they found one just 9 percent of the time.

The fact that people stopped by police turned out to be innocent nine times out of 10 also figured in Scheindlin's equal protection analysis. "The City and its highest officials believe that blacks and Hispanics should be stopped at the same rate as their proportion of the local criminal suspect population," she wrote. "But this reasoning is flawed because the stopped population is overwhelmingly innocent—not criminal….While a person's race may be important if it fits the description of a particular crime suspect, it is impermissible to subject all members of a racially defined group to heightened police enforcement because some members of that group are criminals. The Equal Protection Clause does not permit race-based suspicion."

Bloomberg was outraged by Scheindlin's decision, which he immediately promised to appeal. "There is just no question that stop-question-frisk has saved countless lives," he said. "And we know that most of the lives saved, based on the statistics, have been black and Hispanic young men." He complained that Scheindlin "made it clear she was not interested in the crime reductions" and "ignored the real-world realities of crime."

The assertion that SQF "saved countless lives" is highly dubious, but Bloomberg's result-oriented reasoning was notable in any case. Rather than defending the program's constitutionality, he has consistently defended its effectiveness. In his view, the tiny and declining percentage of stops that yielded guns showed the program was working as a deterrent. He thereby conceded that the searches generally were unconstitutional because they were not justified by reasonable suspicion. His attitude was: So what, as long as it works?

Scheindlin answered that question in her decision. "This case is not about the effectiveness of stop and frisk in deterring or combating crime," she wrote. "This Court's mandate is solely to judge the constitutionality of police behavior, not its effectiveness as a law enforcement tool. Many police practices may be useful for fighting crime—preventive detention or coerced confessions, for example—but because they are unconstitutional they cannot be used, no matter how effective."

That point always seemed to elude Bloomberg. But now that he is about to run for the Democratic presidential nomination, he says he gets it, sort of:

By my final year in office, support for the department had eroded. And the main reason was the practice of something called stop and frisk. Our focus was on saving lives. The fact is, far too many innocent people were being stopped while we tried to do that. The overwhelming majority of them were black and Latino. That may have included, I'm sorry to say, some of you here today. Perhaps yourself or your children, or your grandchildren, or your neighbors, or your relatives. I spoke with many of the innocent people affected, and listened to their frustrations and their anger. And as I said at the time, I'd be angry, too. So in 2012, in my third term, we began putting more safeguards in place, and we began scaling back the number of stops. As we did that, we noticed something important: crime did not go back up. So we began scaling the stops back faster—and further. And by the time I left office, we had cut stops by 94 percent.

While Bloomberg implies that he saw the light on SQF by the end of his third term, he continued to defend the program after leaving office, arguing, without much evidence, that it reduced violent crime. In an interview with The New York Times last year, he suggested that his record of supporting SQF would prove to be an asset if he entered the presidential race. "I think people, the voters, want low crime," he said. "They don't want kids to kill each other." As recently as March, he was mocking the notion of launching "an apology tour," à la Joe Biden, to make up for a history of supporting anti-crime policies that are now unpopular with Democratic primary voters.

Bloomberg may have changed his mind about the political risks of continuing to brag about SQF. But the idea that he suddenly realized the program was unfair and unconstitutional after defending it for nearly two decades, even if you believe it, is hardly reassuring. It makes you wonder what mistakes he would make as president that he would come to regret years after leaving office.