NEW DELHI — President Vladimir V. Putin flew into New Delhi on Wednesday in need of a friend.

China is a friend, but a giant and possibly a threatening one, inclined to use Russia’s vulnerabilities to its advantage. Japan was becoming friendlier, but it joined the West in its campaign of economic sanctions against Russia over the war in Ukraine, and a planned visit by Mr. Putin was scrapped in November. The same month, after being browbeaten over Ukraine at the Group of 20 summit meeting in Australia, Mr. Putin left before the event officially ended.

India, however, is a warm and sentimental friend. Shared mistrust of the United States bound the two countries throughout the Cold War.

As recently as July, India’s prime minister, Narendra Modi, reassured Mr. Putin that nothing had changed.

“Ask any child in India who is India’s best friend internationally, and they will tell you that it is Russia,” he said.