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鈥檚 the first time in the event鈥檚 42-year history that it鈥檚 been cancelled.

Preparations were well underway for Sunday鈥檚 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鈥檚 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鈥檚 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.

鈥淭here 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鈥檚 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 鈥渨e have to have a city going forward鈥 at a news conference, Bloomberg issued a statement cancelling the event, saying he wouldn鈥檛 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鈥檚 one of the toughest decisions they have ever made but it鈥檚 鈥渢he 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 鈥渉eavy 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鈥檛 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鈥檚 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 鈥淐ancel the 2012 NYC Marathon鈥 had more than 50,000 likes by Friday evening. Reaction to the cancellation was swift.

鈥淢arathon cancelled! Yay!!鈥 wrote Cinthya Valdes.

鈥淭hank God鈥 Let pray n help the NYC residents in need, wrote Sue McQ.

鈥淭hey ultimately made the right decision. It鈥檚 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.

鈥淣YC 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鈥檚 Todd Battis in New York and files from The Associated Press