MOSCOW — President Vladimir V. Putin said Monday that he would scrap Russia’s South Stream gas pipeline, a grandiose project that was once intended to establish the country’s dominance in southeastern Europe but instead fell victim to Russia’s increasingly toxic relationship with the West.

It was a rare diplomatic defeat for Mr. Putin, who said Russia would redirect the pipeline to Turkey. He painted the failure to build the pipeline as a loss for Europe and blamed Brussels for its intransigence.

The decision also seemed to be a rare victory for the European Union and the Obama administration, which have appeared largely impotent this year as Mr. Putin annexed Crimea and stirred rebellion in eastern Ukraine.

Russia had long presented the $22 billion South Stream project as a sound business move. But Washington and Brussels had dismissed it as a thinly veiled attempt by the Kremlin to cement its position as the dominant supplier in Europe while sidestepping Ukraine, where price disputes with Moscow twice interrupted supplies in recent years.