After days of intensifying pressure from runners, politicians and the general public to call off the New York City Marathon in the wake of Hurricane Sandy, city officials and the event’s organizers decided Friday afternoon to cancel the race.

The move was historic — the marathon has taken place every year since 1970, including the race in 2001 held two months after the Sept. 11 terrorist attacks — but seemed inevitable as opposition to the marathon swelled. Critics said that it would be in poor taste to hold a foot race through the five boroughs while so many people in the area were still suffering from the storm’s damage, and that city services should focus on storm relief, not the marathon. Proponents of the race — notably Mayor Michael R. Bloomberg and Mary Wittenberg, director of the marathon — said the event would provide a needed morale boost, as well as an economic one.

“It’s clear that the best thing for New York and the best thing for the marathon and the future is, unfortunately, to move on,” said Ms. Wittenberg, the chief executive of New York Road Runners, the organization that operates the marathon. “This isn’t the year or the time to run it. It’s crushing and really difficult. One of the toughest decisions we ever made.”