The consensus after Israel’s 12-day war with Iran seems to be that it ended in humiliation — not just for the Islamic Republic, but also Russia, which failed to lift a finger for a loyal ally and lost a supplier of critical drones. But that profoundly misreads both President Vladimir Putin’s priorities and the timescale on which he conducts foreign policy.

There’s no doubt that Putin’s ambition to reassert Russia as a force in the Middle East has been set back. The fall of President Bashar Assad in Syria was a significant loss. His failure to come to the aid of Iran, with whom he’d just signed a 20-year strategic partnership was embarrassing.

A year ago, that would indeed have hurt Moscow’s war effort in Ukraine, but Russia now makes its own version of the Iranian Shahed drones. Much more important is to understand where all this fits into Putin’s worldview and priorities. Destroying the Ukrainian state ranks much higher for the Russian president than any other foreign policy goal, whether in the Middle East or elsewhere. And on that score, the U.S.-Israeli attack on Iran was a net positive.