Ultimately, it appears, New York officials could not tolerate ceding much of the city to a set of trials that could last for years.

“The administration is in a tricky political and legal position,” Julie Menin, a lawyer who is chairwoman of the 50-member Community Board 1 that represents Lower Manhattan, including the federal courthouse and ground zero, said of President Obama and his Justice Department. “But it means shutting down our financial district. It could cost $1 billion. It’s absolutely crazy.”

Ms. Menin said the turning point for her came when she heard Mr. Kelly’s security plan and cost estimates: hundreds of millions of dollars a year. “It was an absolute game-changer,” she said. She wrote a Jan. 17 op-ed article for The New York Times proposing moving the trial to Governors Island off Manhattan; that idea did not catch hold, but the article escalated the outcry against a Manhattan trial.

When the Justice Department announced in November its plans to try Mr. Mohammed and four alleged accomplices blocks from where the World Trade Center stood, Mr. Bloomberg hailed the location as not only workable but as a powerful symbol.

“It is fitting that 9/11 suspects face justice near the World Trade Center site where so many New Yorkers were murdered,” the mayor said at the time. The federal courthouse had hosted major terror trials previously, he noted, and the police were more than up to the security challenge.

And so it is possible that the reversal will call into question the calibrated effort of Mr. Obama and his attorney general, Eric H. Holder Jr., to bring the handling of suspected terrorists out of the realm of military emergency and into the halls of civilian justice.

If the message to Al Qaeda and its supporters in November was that New York City was able, even eager, to bring justice to those who plotted mass murder, the message of January is far less confident.