President Obama has spoken once again during the Ukraine crisis about being on the right “side of history.” It’s one of his signature lines, but he should stop: The phrase implies there’s an inevitability to the advance of progress and justice. Would that it were so.

What’s happening now in Vladimir Putin’s Russia is a reminder that history has ebbs and flows, advances and retreats, and that its interpretation is subjective. Even more, recent events are a warning that decisive turns in history can result from ruthless political leaders, from weak or confused adversaries, or sometimes just from historical accident. Might doesn’t make right, but it does create “facts on the ground” that are hard to reverse.

Putin’s real problem is that he’s on the wrong side of NATO. This stance was a loser for his Soviet predecessors, and it’s likely to be so for Putin — as long as the West keeps its head and doesn’t take impulsive actions that would play into his hands. A cautious NATO didn’t send troops into Hungary in 1956 or Czechoslovakia in 1968 to counter Soviet aggression, to catcalls from conservatives, but it decisively won the Cold War.

Putin’s putsch in Crimea has had one profoundly positive effect on Obama and the West. It has produced what NATO’s Supreme Allied Commander Europe, Gen. Philip Breedlove, last weekend called a “paradigm shift” in perceptions of the Russian leader. “What . . . has changed in this paradigm,” Breedlove explained, is that a Russia that “used to be a partner [is] now acting more like an adversary [which] puts force at-ready on our borders. And we have to be positioned differently and be more ready.”

By annexing Crimea, Putin has indeed altered the framework in which the United States and other countries evaluate Moscow’s actions. Presumably this repositioning of Russia was part of what Putin intended, but it’s a risky strategy that has produced diplomatic, economic and military responses from a united West. Putin leads what by most political and economic indicators is a weak nation — a declining power, not a rising one. Russia has a pugnacious, revanchist leader who is willing to use force, but that’s a recipe for victory only if the West capitulates.

Breedlove was careful in discussing NATO military options. “Moving forces is not a trivial matter,” he said, noting that it would be hard to counter a Russian army at the Ukrainian border that is “very, very sizable and very, very ready.” But given the destabilizing effects of a Russian invasion of eastern Ukraine, NATO should prepare some deterrent to further aggression other than jawboning.

Listening to the conversation among Americans and Europeans last weekend at the Brussels Forum, I came away with a sense that Putin’s gambit will fail over time, if Europe and the United States remain resolute and patient. Ukrainian Foreign Minister Andriy Deshchytsya told me his country is determined now to join the European Union — remaining at peace with its neighbor to the east, if possible, but “absolutely” prepared to fight Russian troops if they invade eastern Ukraine.

The real challenge, said Deshchytsya, is to make a success of Ukraine’s “Euro-revolution,” as he called it. “We need to start reforms today,” he explained, from the country’s corrupt financial system to its weak military. He made his comments in a session I moderated, sponsored by the German Marshall Fund (of which I’m a trustee).

Obama gets pounded daily by conservatives who imply that he invited Putin’s attack on Crimea. But since the crisis began, Obama has actually been quite firm. The United States pushed Europe to adopt sanctions by announcing its own first, and NATO made some prompt military moves to reassure Poland and the Baltic states. The United States has also moved quietly to help Ukraine cut nearly a third of its Russian gas imports by year’s end and dispense with them entirely by 2020.

The key for Obama is to stay the course he has begun and to work closely with German Chancellor Angela Merkel. Hopefully she will be an “iron lady” in this crisis, as she was in dealing with Europe’s economic meltdown. Putin has seemed contemptuous of Obama, but he may be less so if the president is acting in concert with Merkel.

The communists of a century ago talked about the inevitability of their triumph. History was an inexorable dialectical movement toward their side, they thought. How wrong these historical determinists were. The battle for democracy is fought anew each time, and nowhere is it preordained that the good guys will win.

Read more from David Ignatius’s archive, follow him on Twitter or subscribe to his updates on Facebook.