A year ago, most Ukrainians didn’t want to join NATO. U.S. tanks weren’t doing training exercises near the Russian border. And a dollar bought 33 rubles.

But after the most tumultuous stretch of President Vladimir ­Putin’s 15 years in power, Russia is confronting a new reality. Ukraine — the part not held by rebels — has turned firmly toward Europe. NATO troops are on alert in the Baltics, hard up against the Russian frontier. And the ruble has lost nearly half its value against the dollar, wiping away years of gains for the Russian middle class.

Putin has also won major ­victories, foremost among them the annexation of Ukraine’s Crimean Peninsula, an achievement he said would be inscribed in the annals of Russian history alongside the exploits of Catherine the Great. A frozen conflict in eastern Ukraine gives him leverage over the rest of that country. And his approval ratings are at record highs, a measure of how skillfully he has convinced people that he is confronting a West determined to declaw the powerful Russian bear.

Many of the developments of the past year run counter to ­Putin’s most important strategic goals, including furthering the prosperity that was crucial to consolidating power in his first years in office. Russia enters the new year on unsteady footing, as falling oil prices and tough Western sanctions threaten to cripple its economy. The ruble lost 20 percent of its value in just hours on Tuesday before rebounding .

But in a swaggering, year-end news conference last week, Putin showed little sign of distress. The West would have found another way to attack Russia, even without Crimea, he said. He promised the economy would be better than ever in two years. Divorced in 2013, he even announced he had found love.

Despite the Russian leader’s ­assurances that prosperity is around the corner, Kremlin advisers, diplomats and analysts say that no stability is in sight.

“This is not the price we have to pay for Crimea,” Putin said last week. “This is actually the price we have to pay for our natural aspiration to preserve ourselves as a nation, as a civilization, as a state.”

It is a steep price. One of Putin’s primary goals has been to fend off NATO, the Western defense alliance, which many Russians see as a threat to their security. NATO’s 2004 expansion to the Baltic states — and thus to Russia’s ­borders — is a major thorn in Putin’s side. Kremlin advisers say he was convinced that Ukraine was the next target. That would have threatened the base used by Russia’s Black Sea fleet in Crimea.

In reality, Western diplomats say, NATO membership for Ukraine was never on the table, particularly because a majority of Ukrainians opposed it. But ­Russia’s March annexation of Crimea wound up reinvigorating the alliance.

“We need to think about our allies, the positioning of our forces in the alliance and the readiness of our forces in the alliance, such that we can be there to defend against it [Russia] if required,” said U.S. Air Force Gen. Philip Breedlove, the commander of NATO’s military forces, days after Crimea was annexed.

Since the Crimea annexation, the number of NATO fighter jets patrolling the Baltic skies has tripled, and the jets have frequently intercepted their Russian counterparts. U.S. tanks are now training in Latvia. In November, they paraded through the streets of Riga as part of Latvian independence day celebrations.

And in Ukraine, a slim majority of citizens now favors joining NATO, according to opinion polls. Before the annexation, support for NATO usually ranged between 20 and 25 percent.

Germany, too, has turned against Russia, despite the sizeable trade between the two nations. German public opinion had been sympathetic to Russia, even after the Crimean annexation. That changed after a passenger jet was downed over rebel-held eastern Ukraine in July. Meanwhile, European Union sanctions have grown increasingly tough.

Economic ‘perfect storm’

In recent months, Russia’s souring economy has become even more troubled. Oil has shed value, and the ruble has plummeted. With Western sanctions choking off the flow of dollars to Russia’s economy, the worst pain could be yet to come.

“We have probably gotten into a perfect storm,” Economy Minister Alexei Ulyukayev told the Vedomosti newspaper last week. “If there had been neither sanctions nor a fall in oil prices, and if we had done no foolish things, economic growth would have been 2.5 to 3 percent,” he said. The Western-oriented minister did not elaborate on what he thought had been foolish.

The central bank is forecasting a contraction next year of up to 4.8 percent, and independent economists expect even worse. Never before has Putin ruled in such grim economic conditions.

But Putin last week shrugged off the difficulties, and for now, so have most of his citizens. He has some reasons to gloat: He seized Crimea without losing a soldier, and the world has largely moved on from expecting that Crimea will switch hands again anytime soon.

The annexation of Crimea was wildly popular in Russia, sending Putin’s approval ratings to record highs. In January, 65 percent of Russians held positive views of him. By March, that number stood at 80 percent, according to the independent Levada Center. Putin’s ratings have stayed high — in part because Russians have rallied around the president in response to the imposition of Western sanctions.

Under Putin, “for the first time in 100 years of Russian history, Russia was living without an external threat,” said Sergey Karaganov, a dean of international relations at the Higher School of Economics in Moscow, who until last year advised the Kremlin on foreign policy.

“In a way, the sanctions have been invited. To create an external threat, an organizational principle, a nationalization of the elites.”

And through the conflict in eastern Ukraine, Putin maintains strong leverage over that entire country. Ukraine may not join Russia’s orbit, but its economy is too war-ravaged to turn fully westward either. An E.U. leader, Jean-Claude Juncker, said last week that Ukraine needs $15 billion in additional aid — but that the European Union would be able to provide little of the money.

As pressure has intensified on Russia’s economy, some of the most belligerent language on Ukraine has dropped out of ­Putin’s vocabulary. After October, he stopped referring to “Novorossiya,” a provocative term for the band of land including eastern Ukraine that was once part of the Russian Empire.

But by that point, he didn’t need to remind anyone that parts of Ukraine were bound to Russia. To that extent, he had already won.

“We’ve entered a period of change. We’re at the very beginning of that, but I see big things facing Russia,” said Dmitri Trenin, the head of the Carnegie Moscow Center. “Stability is not going to be a mark of the next few years.”