“While holding the race would not require diverting resources from the recovery effort, it is clear that it has become the source of controversy and division,” the mayor said in a statement.

“The marathon has always brought our city together and inspired us with stories of courage and determination. We would not want a cloud to hang over the race or its participants, and so we have decided to cancel it.”

The decision came after bullish declarations from Bloomberg, including at a televised news conference held earlier Friday, saying that the 40,000-runner, five-borough race would, in fact, go on.

“New York has to show we are here and we are going to recover,” Bloomberg had said before the cancellation, adding that the race would give “people something to cheer about in what has been a dismal week for a lot of people” and that runners’ donations would go toward relief efforts.

Now, changing course, the mayor cited popular pressure as a reason for canceling the race. The run was to start in Staten Island, still awash in ruin after the storm.

“We cannot allow a controversy over an athletic event -– even one as meaningful as this -– to distract attention away from all the critically important work that is being done to recover from the storm and get our city back on track,” his office said in a statement.