Mayor Michael Bloomberg backtracked Friday on his vow to hold the New York City Marathon, pulling the plug on the race as the city struggles to recover from the devastation hurricane Sandy left in its wake.

It’s the first time in the event’s 42-year history that it’s been cancelled.

Preparations were well underway for Sunday’s marathon which draws an estimated 47,500 runners from around the world and more than one million spectators.

The race through five boroughs was to have begun in Staten Island which was hammered by the storm and was the scene of 19 of New York’s 41 storm fatalities.

Front-end loaders were busy Friday scooping the remnants of houses and furniture that were damaged by the storm surge that came in like a tidal wave. While the water is gone, the stench from garbage piled high, destruction and danger remain.

As hundreds of thousands of New York City residents remain without electricity, deal with property damage and the cleanup barely underway, some were angered by Bloomberg’s insistence that the race proceed.

Images of generators brought in not to help power hundreds of homes but to light signs for the race and that were guarded by security while some New Yorkers shivered under blankets as temperatures dipped to about 4 degrees Celsius at night only added fuel to the fire.

“There are children out there without blankets without anything and then these generators are for a race?” one woman asked.

With fuel deliveries disrupted by storm damage and gas stations without electricity to run their pumps, gasoline is a hot commodity. A massive lineup formed at one gas station when word got out it had some. It was being rationed.

Top city officials disagreed with the mayor’s position that the race would not divert key resources such as police and sanitation workers from the recovery effort.

Others questioned where participants would stay, with hotels full of evacuees.

Only hours after declaring “we have to have a city going forward” at a news conference, Bloomberg issued a statement cancelling the event, saying he wouldn’t want a cloud to hang over the race or its participants.

"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."

Mary Wittenberg, president of the organizing New York Road Runners, said it’s one of the toughest decisions they have ever made but it’s “the right thing for New York.”

Earlier in the week there were the highest hopes that the marathon would be an amazing opportunity to honour the city and dedicate the race to those hurt and killed in the storm, she said.

But with “heavy hearts” the best way to help New York City is not to hold the event, she said.

While holding a shorter race was considered, it was decided that the marathon – which has been run annually since 1970 including about two months after the 9-11 attacks in 2001 -- won’t be staged until next year, said George Hirsch, chairman of the New York Road Runners.

The decision will be difficult news for people who have trained all year and have come around the world to run, but it’s the right decision, added Hirsch.

Indeed the news stunned some runners at the midtown New Yorker Hotel. Tears rolled down some runners’ faces while others had puffy eyes.

"I have no words," said Roberto Dell'Olmo, from Vercelli, Italy. Later he said: "I would like that the money I give from the marathon goes to victims."

Manhattan entrepreneur Steve Brune had been hoping to run the race for the fourth time.

"I'm disappointed, but I can understand why it's more important to use our resources for those who have lost a lot," he said.

But others celebrated the news online.

A Facebook page called “Cancel the 2012 NYC Marathon” had more than 50,000 likes by Friday evening. Reaction to the cancellation was swift.

“Marathon cancelled! Yay!!” wrote Cinthya Valdes.

“Thank God… Let pray n help the NYC residents in need, wrote Sue McQ.

“They ultimately made the right decision. It’s very heartening and encouraging to see that a groundswell of common citizens can still move government at times,” wrote Gary Brownell.

Some celebrities took to Twitter to weigh in.

“NYC marathon is cancelled!! Time to put the energy and resources towards those in need #Sandy,” tweeted fashion designer Zac Posen.

James Molinaro, the borough's president, said a relief fund is being set up for residents on Staten Island. Homeland Security Secretary Janet Napolitano and top Federal Emergency Management Agency officials plan to tour the island.

Food, blankets, portable toilets -- and yes, those generators that sparked the controversy -- that had been brought in for the marathon will now be donated by race organizers to the relief efforts.

With a report by CTV’s Todd Battis in New York and files from The Associated Press