Mr. Putin’s diplomatic isolation, though pronounced in Europe and the United States, has never been complete. Last week, he basked in the praise of world leaders, including Presidents Xi Jinping of China and Hassan Rouhani of Iran, who had gathered in the Russian city of Ufa for meetings of three economic groupings with Russia at the core: the Shanghai Cooperation Organization, the Eurasian Economic Union, and the BRICS group of rising economic powers: Brazil, Russia, India, China and South Africa.

More remarkable was the credit from President Obama, who said Tuesday that Mr. Putin was instrumental in securing the accord on Iran’s nuclear program. “Putin and the Russian government compartmentalized on this in a way that surprised me, and we would have not achieved this agreement had it not been for Russia’s willingness to stick with us,” Mr. Obama said.

Mr. Obama also noted that Mr. Putin called him recently to discuss the situation in Syria and suggested further cooperation could be possible, despite the ongoing disagreement over Ukraine. Mr. Obama followed up those remarks with a telephone call to Mr. Putin on Wednesday that, the Kremlin said, emphasized the “role of the Russian-American dialogue in ensuring security and stability in the world.”

Whether any cooperation over Syria is possible remains to be seen. Mr. Obama and his aides, including Secretary of State John Kerry, have said repeatedly that the United States would continue to work with Russia on areas of mutual interest, like Iran and Syria, even as the overall relationship descends into mutual recriminations and increasingly hostile exchanges over Ukraine. The Iran accord would seem to validate their approach, though Mr. Putin has hardly returned to the fold.

On the question of Ukraine, and especially Russia’s annexation of Crimea, he is not the least apologetic, and in public remarks he has continued to blame the West and the Ukrainian government for the crisis there. At the same time, analysts say, Mr. Putin has adeptly kept himself on the world stage, making calculated diplomatic decisions that are undermining efforts in the West to cast him as a villain.