MOSCOW — In a sharp rebuff to the West in the diplomatic wrangle over Ukraine, President Vladimir V. Putin said Tuesday that Russia would come to the rescue of its financially troubled neighbor, providing $15 billion in loans and a steep discount on natural gas prices.

It was a bold but risky move by Russia, given the political chaos in Kiev, the Ukrainian capital, where thousands of demonstrators remain encamped in Independence Square, protesting their government’s failure to sign political and free-trade accords with Europe.

For the moment, however, Mr. Putin seemed to gain the upper hand over Europe and the United States in their contest for Ukraine, a former Soviet republic of 46 million that Russia sees as integral to its economic and security interests. It is by far the region’s most populous and influential country that has remained outside the European orbit.

For Mr. Putin, the jousting over Ukraine is the latest of several foreign policy moves that have served to re-establish Russia as a counterweight to Western dominance of world affairs. This year, he defied Washington by granting temporary asylum to Edward J. Snowden, the former National Security Agency contractor, and deflected an American military strike on his longtime ally, President Bashar al-Assad of Syria, with a proposal to eliminate Syria’s chemical weapons.