(CNN) -- Amid growing backlash, officials announced Friday that the iconic New York City Marathon will be canceled for the first time in its history as the city works to recover from the devastating aftermath of Superstorm Sandy.
The move comes two days after Mayor Michael Bloomberg said the race, originally scheduled for Sunday, would go on, sparking a chorus of criticism from local authorities and residents, inspiring a boycott effort on Facebook, and becoming a trending topic on Twitter as users called for its postponement.
"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," a statement from the mayor said.
"We would not want a cloud to hang over the race or its participants, and so we have decided to cancel it. 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."
First held in 1970, the New York City Marathon attracts about 47,000 runners and 12,000 volunteers. An estimated 2.5 million spectators typically line the course, which winds through all five city boroughs.
But it was the starting line in Staten Island -- one of the areas hardest hit by Sandy -- that drew much of the criticism. At least 20 people on the island were killed in the storm, which left homes in shards and large portions of neighborhoods under water. Residents on Staten Island pleaded Wednesday for gas, food, and clothes. One lady standing outside damaged homes said she had eaten one slice of pizza in the past two days.
U.S. Rep. Michael Grimm, who represents Staten Island and Brooklyn, said before Friday's announcement that the city had its priorities wrong.
"We're still pulling bodies out of the water and the mayor is worried about marathon runners and returning to life as normal," Grimm said in a statement. "The Verrazano Bridge should be used for getting fuel and food in to Staten Island, not getting runners out. Police resources would be best allocated to prevent looting and in rescue and recovery operations."
A series of photos of the island's devastation went viral Friday. The post by BuzzFeed ended with the line: "The NYC Marathon is still scheduled to run on Sunday."
A group of runners scheduled to participate in Sunday's race started a boycott page on Facebook, vowing to wear their bib numbers while they volunteered in recovery efforts on Staten Island.
And Friday's cover of The New York Post also weighed in on the controversy. A simple but powerful headline over a photo of two generators read: "Abuse of Power: These massive generators are providing electricity to the marathon's tent in Central Park while NYers suffer!"
Since announcing his decision Wednesday to move forward with the race, Bloomberg was forced to defend himself daily.
On Thursday, he brushed aside concerns that the marathon would direct crucial resources away from recovery efforts, saying electricity would be restored by race day, thus freeing up police currently manning intersections where the traffic signals and electricity have gone out.
"To host the New York City Marathon in the middle of what is complete devastation and a crisis in parts of this city is just wrong," said City Councilman Domenic Recchia, whose south Brooklyn district includes Coney Island and other areas that suffered heavy damage.
Bloomberg continued his fight for the marathon Friday, recalling another time when city officials were forced to make a tough decision during a sensitive time.
"As Rudy Giuliani said to me this morning, he said, 'You know, right after 9/11 people said exactly the same thing.'" Bloomberg said, adding, "You have to keep going and doing things and you can grieve, you can cry and you can laugh all at the same time. That's what human beings are good at."
Others agreed with his decision to move forward with the race.
Bar manager Paul Wilson said it would be the perfect way to pull together in the aftermath of the storm and would also bring much-needed revenue to the city and to businesses.
Matt McInerney, manager of The Running Company, a runner's apparel store on New York's Upper East Side, said his customers have mixed feelings about the race going ahead. One of his customers was registered to run but decided not to, thinking things won't be managed well enough this soon after the storm, McInerney said.
But the marathon also had the potential to lift the city's spirits, he said. It has an atmosphere unlike any other event in the city, filled with energy and excitement as spectators watch the runners speed by.
Olympic marathoner and former New York City Marathon champion Paula Radcliffe echoed his comments on Twitter this week, saying the city needs "the solidarity, the lift, and the economic boost that Marathon Sunday brings to NYC."
Said Tony Ruiz, a running coach with the Central Park Track Club, "The ramifications of not having the race would be very severe and possibly hurt the city even more, and certainly hurt economically."
The race is also an important fundraiser for hundreds of charities who recruit runners to raise funds, and they stand to lose their pledged donations if the runners can't take part in the race, said Lee Silverman, president of JackRabbit Sports, a running gear retailer that works with many of those charities every year.
New York Road Runners, which puts on the marathon every year, said it is donating $1 million to the Hurricane Sandy Relief Fund and encouraged others to donate as well.