This time, Vladimir Putin did not need to pretend too hard when he announced that a mission was accomplished.

Putin’s declaration on March 14 that the “main part” of the Russian military forces was pulling out of Syria was unexpected in the West. But when Russia first started its big intervention in the Syrian conflict last September, the Kremlin said it would be only for a few months. Now, as far as Putin is concerned, domestic, diplomatic, and military goals have all been achieved.

In his recent interview for the Atlantic, Obama said that Russia was “bleeding” and “overextended” in Syria.

Russians were worried about that, too. Fears were voiced that Syria would become a second Afghanistan, with a protracted conflict and untold casualties ending in a shameful withdrawal. Russia did unexpectedly suffer civilian casualties when 224 people died after its passenger airline was blown up over Sinai on October 31. But even that was perceived at home more as a tragedy in a place beyond Russian jurisdiction than as a failure of Russian policy.

The Russian leadership carefully chose the moment to announce the pullback from Syria: during the truce declared on February 26. The intervention has come at a cost, but arguably one that is not impossibly high in the context of four years of conflict. Human Rights Watch estimates that in 2015 1,700 civilians died from Russian bombs. That is tragic. But so is the fact that an even higher number of migrants—3,770 people—are estimated to have drowned trying to cross the Mediterranean last year.

As far as Moscow is concerned, the casualty figure is a small price to pay for changing the facts on the ground in a conflict where a quarter of a million people has perished.

On the Russian domestic scene, which some experts had considered the main reason for Russia to get involved, interest in Syria had begun to wane among the home television audience. The pictures of silver rockets in a blue sky had been shown so often that there was no mood for a second season of them. The public would rather see successes on the home front.

A more important factor surely was Russia’s place in world diplomacy. After 2014 saw the takeover of Crimea, the shooting down of the Malaysian aircraft, and the Donbas crisis, Russia began 2015 in almost complete diplomatic isolation. A meeting in Minsk or a visit to Sochi by John Kerry looked like a sensational event. Putin’s speech at the UN General Assembly calling for a new worldwide anti-terrorist coalition elicited a muted response.

After Russia launched its military operations, the diplomatic meetings began again and they were long and substantial. Even as Russia was being called opportunistic, unpredictable, and unconstructive, it managed to break out of the siege caused by the Ukraine crisis. If Moscow did not exactly turn the page, it managed to open a new one with a different text written on it.

This “enforced communication” strategy looks to have worked. Russia has found a way back to the table where the world’s board of directors sits and resolves regional conflicts together. This is confirmed by the fact that the current negotiations on the ceasefire in Syria began with a U.S. version of a draft UN Security Council resolution, whose text John Kerry personally brought to Moscow in December, and the truce began with another UN Security Council resolution in which Russia supported the United States. It almost looks like the old days, when the two capitals worked everything out behind the scenes.

Assessing whether Russia achieved its military goals in Syria is a matter of guesswork, but a temperature reading can be taken. The military operation was probably not unbearably expensive. Putin himself incautiously said that it cost not much more than a training exercise. But at a time of penny-pinching throughout the Russian budget, the country cannot envision even an endless training exercise.

On the ground in Syria, Russia changed things significantly. Pro-government armed forces were exhausted after four years of civil war. But, under the cover of Russian airpower, they managed to break the siege of the Kuwairis airbase by the so-called Islamic State and move toward the Turkish border. The main achievement was of a different kind. Russia’s intervention made various armed groups in Syria realize that they were unable to take Damascus by force and overthrow Bashar al-Assad.

The sudden withdrawal of a large part of Russia’s armed forces carries an obvious risk for Moscow. Russia managed to get a seat at the global boardroom table by its military intervention. By ending the intervention, while others have kept their armies on the battlefield, it risks losing the seat as well.

Yet, this is an orderly withdrawal at a moment of peace, not a hasty retreat. We can also speculate that it was not a total surprise and the quid pro quo for Moscow is that it keeps its seat at the table. Moreover, this is not a complete pullout. It looks as though Russia will keep its bases at Tartus and Hmeimim and continue to make selective air strikes from there. The timing of the withdrawal looks designed to protect Russia from unforeseen dangers in Syria from Saudi Arabia, Turkey, or other players.

Some had predicted that Russia would enable Assad to reconquer the whole of Syria. That will not happen—even though in an ideal world the Kremlin might like to see that scenario.

Russia is not committed to paying any price to keep Assad in power. Having put its signature to a document that foresees a political process and a transition period, Russia has effectively agreed to the notion that Assad will leave office. The main thing is that he does so with dignity and does not meet the same end as Muammar Gaddafi. That turn of events would be regarded as a defeat for Putin, both in Russia and in the rest of the world.

The current ceasefire is fragile and that is why it was important to leave now, while it is still working. If the truce turns into a longer-term peace, then Russia can declare a victory. If war breaks out again, then Russia no longer has responsibility for it. Moscow can say, “You see, while we were there, everyone made peace, but when we left—war broke out.”