The G20 joint declaration that avoids direct criticism of Russia for its war against Ukraine is being described as a significant diplomatic win for India.
The agreement of a joint statement in Delhi looked almost impossible a few days ago, given how sharply divided the group was over Russia's invasion of its neighbour.
In the end, we had a declaration that garnered unanimous support from all G20 member nations, without a single dissenting note.
Ukraine itself, which was not represented at the summit, was unhappy - though key players, including the US, the UK, Russia and China, praised the outcome.
So, how did India manage to bring together nations with starkly divergent views on Ukraine?
A close reading of the declaration and some geopolitical developments weeks before the summit offer some clues.
The five-nation Brics group - which includes Brazil, Russia, India, China and South Africa - decided to include six new members during its annual summit in August.
The new members - Argentina, Ethiopia, Egypt, Iran, Saudi Arabia, and the UAE - have close ties with China.
The expansion may not have played a direct role in the outcome of the G20 summit but it's no secret that the West has been wary of China's growing clout, particularly in the developing world, in the past few years.
"It was not a direct factor but the West, especially the US, is conscious that China is effectively trying to create an alternative international order that is anti-Western," says Pramit Pal Chaudhuri, South Asia practice head of Eurasia Group.
What is also not a secret is that the West sees India as a counterweight to China and it would have not wanted Delhi's presidency to end without a declaration."
So, there was more than one reason for the West to help India forge a consensus.
The main sticking point was the war in Ukraine. The G20's declaration in Bali last year had called out "aggression by the Russian Federation against Ukraine" while noting objections from some members to this assessment.
It looked impossible that the West would agree to language that was weaker than that used in Bali, and Russia also indicated it would not agree to a statement that blamed it for the war.
A breakthrough was needed and India was well placed to broker one as it has good relations both with Moscow and the West. In the end, the declaration used language that satisfied Russia but also gave enough to Western countries.
Rather than directly criticising Russia, it said "all states must refrain from the threat or use of force to seek territorial acquisition", while noting "different views and assessments of the situation".
"It was clear that the West did want India to have a diplomatic win. There was always a compromise involved. But the US and the West would not have signed onto a joint declaration if there were issues in the language on which they could not come to an agreement," says Angela Mancini, partner and head of Asia-Pacific markets at consultancy firm Control Risks.
Although the Delhi declaration refrained from blaming Russia for the war, it did reference the "human suffering and adverse repercussions of the conflict in Ukraine on global food and energy security".
In the end, leaders from the UK, the US and France appeared to be in agreement with Russia that the declaration was a good outcome of the summit. The two sides, however, interpreted the wordings differently.
UK PM Rishi Sunak said the declaration had "strong language, highlighting the impact of the war on food prices and food security". Russia's Foreign Minister Sergei Lavrov called the Delhi summit a milestone.
But the unexpected agreement has upset Ukraine as it said the G20 had nothing to be proud of.
The debt crisis facing many developing countries was also a major concern ahead of the summit.
Developing nations have consistently argued that affluent countries must increase their support to help their economies. These were battered by the pandemic, and the war has exacerbated their challenges. The World Bank said in December that the world's poorest countries owed $62bn in annual debt service to creditors and two-thirds of this was owed to China.
China's lending practices have been often described as predatory by Western officials - an allegation Beijing rejects.
China, firmly aligned with Russia, could have potentially vetoed the declaration but it did not. The paragraph about the debt crisis makes no direct or indirect mention of China.
"On debt relief, we did not see any forward movement. In many ways, any criticism of lending practices would have been interpreted as an anti-China move," Mr Pal Chaudhari adds.
The declaration acknowledged the crisis and called upon G20 nations to step up the implementation of the common framework (CF) agreed in 2020 to help vulnerable nations.
Meanwhile, the group agreed on tripling renewable energy capacity by 2030 but it didn't set any major goals on emission cuts, despite the G20 nations accounting for nearly 80% of greenhouse gases.
Crucially, the declaration did not mention any targets on reducing the use of crude oil, and instead focused on phasing out the use of coal. This would have satisfied crude producers like Saudi Arabia and Russia. Even India and China have been uncomfortable with the West setting emission cut targets that they see as "unrealistic".
It's clear that Delhi worked hard to build consensus, even if it came at the cost of making serious compromises.
"Given the fact that it had to be a consensus document, it's not surprising that some of the language was a bit muted in certain areas to reach that consensus," says Ms Mancini.
One topic that united the group even before the summit was the inclusion of the African Union into the G20.
It further bolstered Delhi's push to give the Global South developing nations a bigger say on global platforms.
A Russian government negotiator said this was "one of the most difficult G20 summits" in the almost 25-year-old history of the forum. "It took almost 20 days to agree on the declaration before the summit and five days here on the spot," Svetlana Lukash told Russian news agency Interfax.
It remains to be seen whether the G20 brings the rich and developing nations together or divides the world into two camps.