Russia could, of course, just annex the territories controlled by Moscow’s proxies; or it could freeze the conflict and establish a Russian protectorate there. But in this case, Moscow would be shouldered with the burden of financing an economically unproductive enclave whose infrastructure has been destroyed. And it would have to do so while Russia’s economy is sinking into an ever deeper recession. Moreover, Russia would lose any leverage over the remainder of Ukraine, which would quickly move toward the West. Sanctions would be continued, and possibly escalated.

The Kremlin’s preferred option, given these limitations, is to force the territories back into Ukraine on Moscow’s terms—with broad autonomy and the ability to veto decisions by the Ukrainian government in Kiev. But Ukraine and the West appear unwilling to let this happen. Putin has boxed himself into a corner in Ukraine, and it is difficult to see how he is going to get out of the quagmire he has created.

It’s also difficult to imagine how Putin is going to extract himself from the quagmire he has created at home. The Kremlin leader is caught in a trap of his own making, between economic and political imperatives.

With the economy sinking deeper into recession, inflation spiking, oil prices dipping below $50 a barrel, and the ruble approaching the lows it reached earlier in the year, Putin badly needs sanctions eased to give the economy breathing space. But for that to happen, he would need to climb down in Ukraine—a move that would undermine the whole rationale for his rule and infuriate the nationalist supporters who make up his base.

“Putin’s return to the presidential seat heralded a rather sudden pivot towards a deep-seated domestic nationalism,” Moscow-based journalist Anna Arutunyan wrote recently. “Yet nationalism as a state policy and identity, initially implemented to shore up Kremlin power, now has the Kremlin itself trapped and threatened by forces that it initially nurtured, but can no longer fully control.”

A recent report in Novaya Gazeta, for example, claimed that the war in eastern Ukraine risks “metastasizing” as volunteer fighters return to Russia with large quantities of heavy weapons.

During his first two terms in the Kremlin, Putin’s team—and most notably his chief political operator, Vladislav Surkov—very skillfully co-opted and manipulated both liberal and nationalist groups. That strategy caught up with Putin in 2011-12, when liberal disappointment resulted in the largest anti-Kremlin street protests Russia had seen since the breakup of the Soviet Union—leaving him no place else to turn but toward the nationalists.

“Given the higher prevalence of nationalist views—especially among members of the security services—a sense of betrayal could have much bigger consequences for the Kremlin than simply mass protests,” Arutunyan wrote.