Last September, Russia deployed dozens of jets to Syria to rescue the ailing regime of Bashar al-Assad. Vladimir Putin aimed to protect one of Moscow’s few foreign allies and gain leverage for the coming peace negotiations over the Syrian Civil War. Russian media presented the mission as a heroic attempt to save the civilized world from Islamic terrorism. In Washington, however, Putin was widely seen as wading into a quagmire. According to The Economist: “If America’s Syria-watchers agree on anything it is that the Russian campaign, which has enabled Mr Assad’s forces to make only minor gains, will fail, and thereby encourage Russia to give up on its proxy. That would be a huge boost to the UN-backed peace talks John Kerry, the secretary of state, is brokering, with the aim of replacing Mr Assad with a transitional government early next year.”

But would a loss for Putin really be good news? While it’s tempting to take satisfaction in the Russian president’s travails in Syria—what you might call Putinfreude—Syria-watchers should question their assumptions. If Putin’s military adventure unravels, the result may not be peace.

It’s certainly easy to imagine the Russian intervention deteriorating. In recent weeks, Assad’s forces have made some limited gains around the Syrian city of Aleppo. But the overall strategic situation for Damascus remains highly precarious. Last year, the Syrian regime suffered a string of battlefield defeats, and Assad publicly admitted to “fatigue” and “a lack of human resources [in the army].” The regime pulled back to defensible territory and was left in control of a rump coastal strip representing around one-sixth of the country. Russian jets are not enough for victory. It would likely take tens of thousands of troops to recapture and hold cities like Aleppo and Raqqa.

Russia is in a perilous position, internationally isolated and enduring economic turmoil. And now Putin has plunged into the unknown. Moscow doesn’t have experience coordinating military operations with Syria, Iran, and Hezbollah. This is Russia’s first military expedition outside of its immediate sphere of influence since the end of the Cold War. Putin has also pinned his fortunes on a highly incompetent dictator; Assad’s policies of systematic torture and barrel bombing of civilians brewed the hell broth in Syria.

And two can play at the great game of proxy warfare. Patrons of the Syrian insurrection, like Turkey and the Gulf states, may match Russian intervention by stepping up their own assistance to rebels—in the form, for example, of anti-aircraft missiles. During the 1980s, the Soviet Union’s counterinsurgency war in Afghanistan unraveled in part because the CIA provided ground-to-air Stinger missiles to the mujahideen.

To get a sense of what could await Putin, look at Iran’s experience in Syria. When Tehran first chose to aid Assad, it likely didn’t realize that Syria would become a sinkhole that would cost hundreds of Iranian military personnel and tens of billions of dollars. Or consider Iran’s Lebanese proxy Hezbollah, which marched over the border to save Assad and subsequently lost around 1,200 to 1,700 fighters in a seemingly endless morass.

In other words, Putin’s war may very well fail. But if it does, will he make concessions and abandon his ally? If the Russian president acts rationally, he should cut his losses. Putin, however, may not act rationally. When I researched my book on military disaster, The Right Way to Lose a War, I was struck by how poorly governments tend to handle battlefield reversals. From the United States in Vietnam to the Soviet Union in Afghanistan, leaders often respond to defeat with disastrous decisions that only worsen their plight. Rather than coolly looking for a way out of the predicament, they rage against the dying of the light.

Part of the problem is what psychologists call “loss aversion.” Losing hurts twice as bad as winning feels good—whether in a tennis match or a war. The idea of accepting even a small loss can seem intolerable, and people are tempted to risk greater losses for a shot at the win. The gambler who drops 20 bucks in a casino doesn’t walk away; he doubles his bets. In a similar vein, the president who loses 1,000 soldiers in Vietnam doesn’t end the war; he sends half a million Americans into the mire.

It’s hard to imagine Putin accepting defeat. He has cultivated an image as the father of the Russian people, who is restoring the country as a world power. If Assad’s regime falls, Russia could lose its only military installation outside the former U.S.S.R.—the naval base in Tartus, Syria. Therefore, if the war effort collapses, Putin may want to salvage something from the wreckage, potentially moving the conflict into a dangerous new phase. He could intensify Russian air strikes or deploy “little green men”—as the Russian soldiers serving unofficially in eastern Ukraine were called. Once Russian troops start dying in Syria, all bets are off.

Putin, moreover, has repeatedly responded to the potential loss of client regimes with military force. In 2008, the Russian military intervened in Georgia to punish pro-Western Georgian President Mikheil Saakashvili and protect the independence of the breakaway Georgian territories of Abkhazia and South Ossetia. Six years later, in 2014, Putin aided Ukrainian rebels and annexed Crimea following the toppling of pro-Russian Ukrainian President Viktor Yanukovych. In late 2015, with Assad’s forces reeling, Putin once again intervened to stabilize a client regime.

And Putin has already raised the prospect of further military escalation, saying that Russia is using “far from everything we are capable of” in Syria and that “We also have other things as well and will use them if necessary.”

What’s the solution? If Russia’s defeat could trigger hazardous escalation, this doesn’t mean a Russian victory is preferable. After all, if Assad somehow assumed a winning position, why would he negotiate a compromise peace that recognized the interests of all Syrian groups? Instead, the optimal opportunity for a peace deal may be a situation in which Putin believes a decisive triumph is not possible, but he can still save face by spinning the outcome as a success. In other words, he needs a story to tell the Russian people about the positive results of the mission. This narrative doesn’t need to be true, but it does need to have truthiness, or a seeming plausibility. And so, to get Putin out of Syria, the United States might need to play along by avoiding boastful claims of a major Russian debacle. In 1989, after the Berlin Wall fell, U.S. President George H.W. Bush deliberately refused to declare the development a win—to avoid complicating the life of Soviet Premier Mikhail Gorbachev.

Putin needs a victory speech. And Washington may have to help him write it.