Inside City Hall, the calls poured in late Thursday, predicting a debacle: Hundreds of people sympathetic to the Occupy Wall Street protest were streaming into Lower Manhattan, vowing to resist a forced cleanup of the park taken over by demonstrators.

“This is not going in a good direction,” Daniel L. Squadron, a state senator, recalled telling aides to the mayor.

Just before midnight came a sign that the calls were having an impact: The park’s owner, also under pressure, e-mailed City Hall to say the plan should be canceled. The mayor’s office agreed — the police would stand down and the protesters would remain, with their sleeping bags and tents, in Zuccotti Park.

The abrupt and unexpected reversal, loudly cheered by rain-soaked demonstrators in the early morning darkness, averted a dangerous clash at the southern tip of Manhattan and seemed to give the unfolding protests against corporate greed, once dismissed as aimless and ephemeral, a growing air of credibility and endurance.