(CNN)What a difference a few weeks make. Just last month India was taking flak from the West for its relationship with Russia.
Not only was the South Asian country refusing to condemn Moscow's brutal assault on Ukraine, but its purchases of discounted Russian oil -- said critics -- were flying in the face of sanctions aimed at crippling the Kremlin's finances.
And the White House was making its displeasure clear, calling New Delhi "somewhat shaky" and speaking of its "disappointment."
Then all of a sudden, the West's tune changed. When Biden met Indian Prime Minister Narendra Modi this month, it was all diplomatic backslapping and soundbites about "a deep connection between our people" and "shared values." Then on Friday British leader Boris Johnson flew into Delhi to talk up trade ties and pose for costumed photo ops, all while glossing over "differences" regarding Russia.
Yet India's stance on Ukraine remains largely the same. It is still buying cheap Russian oil -- in fact, it has bought nearly as much in the first months of 2022 as it did in whole of 2021, according to Reuters -- and it remains quiet on Moscow's invasion. As recently as April 7 it abstained from a UN vote suspending Russia from the Human Rights Council.
India, analysts say, just taught the West a masterclass in international diplomacy.
With India vital to US efforts to counter the rise of China -- seen by the US as potentially an even bigger threat to world peace than Russia -- the West needed to bite its tongue.
Or as Harsh V. Pant, a professor in international relations at King's College London, put it, the United States realized it needed to treat India as a "new partner that needs to be wooed."
Why is India vital to the US?
Both New Delhi and Washington are becoming increasingly uneasy over China's growing military might, its aggressive territorial claims on land and at sea, and its growing economic influence over its smaller neighbors.
Under President Xi Jinping, China's military -- the People's Liberation Army -- has grown to field the world's largest navy, technologically advanced stealth fighter jets and a growing arsenal of nuclear weapons.
Part of Washington's plan to counter this rests with India's inclusion -- alongside the US, Japan and Australia -- in the increasingly active security grouping known as the Quad, said Pant, who is also head of the Strategic Studies Program at the Observer Research Foundation in New Delhi.
Meanwhile, India has its own concerns with China. The two countries have been engaged in a military standoff along their shared Himalayan border that has claimed dozens of lives in the past couple of years. And, in an irony that won't have been lost on Washington, India relies heavily on Russian arms to equip its military -- including in the Himalayas.
Shared concerns over Chinese aggression were made clear after the Biden-Modi meeting, when US Defense Secretary Lloyd Austin warned China was seeking to "refashion the region and the international system" and said the US and India had "identified new opportunities to extend the operational reach of our militaries."
It was a sign that -- whatever their differences over Ukraine -- the two countries had a deep "understanding of each other's positions," said Manoj Kewalramani, a fellow of China studies at the Takshashila Institution in India.
Vocal on China, silent on India
These concerns help explain why Washington continues to criticize China's silence on Russia's actions in Ukraine, even as it turns quiet on India's.
Superficially, at least, India and China appear to have similar positions on the Ukraine war. Both have positioned themselves as neutral onlookers -- rather than vocal opponents -- both have called for peace and both have refused to condemn the invasion outright.
And both have strategic relationships with Russia that they are keen not to jeopardize.
Chinese President Xi Jinping and Russian leader Vladimir Putin declared in February their relationship had "no limits," while on some estimates India gets more than 50% of its military equipment from Russia.
But these similarities are only superficial. In fact, there are "vast differences," according to Kewalramani.
China has decried Western sanctions and repeatedly blamed the US and NATO for the conflict, parroting Russia's view that NATO precipitated the crisis by expanding eastwards, Kewalramani said. Its state-run media has also amplified Russian talking points and disinformation.
India on the other hand has steered clear of criticizing NATO and a