HARARE, Zimbabwe — The rapid fall of Zimbabwe’s president, whose legendary guile and ruthlessness helped him outmaneuver countless adversaries over nearly four decades, probably has surprised no one more than Robert Mugabe himself.

For years, he was so confident of his safety — and his potency — that he took monthlong vacations away from Zimbabwe after Christmas, never facing any threat during his long, predictable absences. Even at 93, his tight grip on the country’s ruling party and his control over the military made his power seem impervious to question.

But in just a matter of days, Mr. Mugabe, who ruled his nation since independence in 1980, was largely stripped of his authority, even as he still clung to the presidency.

In a much-anticipated speech on Sunday night, Mr. Mugabe, instead of announcing his resignation as most of the country had expected, stunned Zimbabwe by refusing to say he was stepping down. While he conceded that his country was “going through a difficult patch,” he gave no sign that he recognized, or accepted, how severely the ground had shifted under him in such a short time.