MOSCOW — Its economy, already smaller than Italy’s, may be sputtering but, two decades after a virtually unknown former K.G.B. spy took power in the Kremlin on Dec. 31, 1999, Russia and its president, Vladimir V. Putin, have just had what could be their best year yet.

The United States, an implacable foe during the Cold War but now presided over by a president determined to “get along with Russia,” is convulsed and distracted by impeachment; Britain, the other main pillar of a trans-Atlantic alliance that Mr. Putin has worked for years to undermine, is also turning inward and just voted for a government that vows to exit the European Union by the end of January.

The Middle East, where American and British influence once reigned supreme, has increasingly tilted toward Moscow as it turned the tide of war in Syria, provided Turkey, a member of NATO, with advanced missile systems, and signed contracts worth billions of dollars with Saudi Arabia, America’s closest ally in the Arab world. Russia has also drawn close to Egypt, another longtime American ally, become a key player in Libya’s civil war, and moved toward what looks more and more like an alliance with China.

It has been barely five years since President Barack Obama’s dismissive 2014 judgment of Russia as a “regional power” capable only of threatening its neighbors “not out of strength but out of weakness.” Its successes raise a mystifying question: How has a country like Russia, huge in size — it has 11 time zones — but puny when measured by economic and other important metrics, become such a potent force?