The Group of 20 nations adopted a consensus declaration at a summit on Saturday that avoided condemnation of Russia for the war in Ukraine but called on all states to refrain from the use of force to seize territory.
Prime Minister Narendra Modi of host India announced that the Leaders' Declaration had been adopted on the first day of the weekend summit.
The consensus came as a surprise as the group is deeply divided over the war in Ukraine, with Western nations earlier pushing for strong condemnation of Russia in the Leaders' Declaration, while other countries demanded a focus on broader economic issues.
There was no immediate reaction from most other members.
"We call on all states to uphold the principles of international law including territorial integrity and sovereignty, international humanitarian law, and the multilateral system that safeguards peace and stability," the declaration said.
"We ... welcome all relevant and constructive initiatives that support a comprehensive, just, and durable peace in Ukraine.
"The use or threat of use of nuclear weapons is inadmissible," the statement added.
The declaration also called for the implementation of the Black Sea initiative for the safe flow of grain, food and fertiliser from Ukraine and Russia. Moscow pulled out of the agreement in July over what it called a failure to meet its demands to implement a parallel agreement easing rules for its own food and fertiliser exports.
"On the back of the hard work of all the teams, we have received consensus on the G20 Leaders Summit Declaration. I announce the adoption of this declaration," Modi told the leaders in New Delhi, including U.S. President Joe Biden and heads of government and state from across the world.
The differing views on the war had prevented agreement on even a single communique at ministerial meetings during India's G20 presidency so far this year.
The declaration also said the group agreed to address debt vulnerabilities in low and middle-income countries "in an effective, comprehensive and systematic manner", but did not make any fresh action plan.
It said countries pledged to strengthen and reform multilateral development banks, while it accepted the proposal for tighter regulations of cryptocurrencies.
It also agreed that the world needs a total of $4 trillion of low-cost financing annually for the energy transition, with a high share of renewable energy in the primary energy mix.
The statement called for accelerating efforts towards a "phasedown of unabated coal power", but said this had to be done "in line with national circumstances and recognizing the need for support towards just transitions".
HELP FROM DEVELOPING NATIONS
India's G20 sherpa, the country representative to the bloc, said the host nation worked "very closely" with Brazil, South Africa and Indonesia to reach a consensus on the language on the war in Ukraine in the summit document.
India's Foreign Minister Subrahmanyam Jaishankar said China, Russia's main major ally, was supportive of the outcome.
"Differing viewpoints and interests were at play, but we were able to find common ground on all issues," he told a press conference.
At the start of the day, Biden and other leaders were driven through deserted streets to a new, $300 million conch-shaped convention centre called Bharat Mandapam, opposite a 16th-century stone fort.
Many businesses, offices and schools have been closed in the city and traffic restricted as part of security measures to ensure the smooth running of the most high-powered meeting to be hosted by the country.
Modi inaugurated the meeting by calling on members to end a "global trust deficit" and announced that the bloc was granting permanent membership to the African Union in an effort to make it more representative.
Despite the compromise over the Leaders' Declaration, the summit had been expected to be dominated by the West and its allies. Chinese President Xi Jinping is skipping the meeting and has sent Premier Li Qiang instead, while Russia's Vladimir Putin was also absent.
Biden, German Chancellor Olaf Scholz, French President Emmanuel Macron, British Prime Minister Rishi Sunak, Saudi Arabia's Mohammed Bin Salman and Japan's Fumio Kishida, among others, are attending.
"It's incumbent upon the Chinese government to explain" why its leader would or would not participate, Jon Finer, the U.S. deputy national security adviser, told reporters in Delhi.
Biden said on Saturday: "It would be nice to have him here but the summit is going well."
Finer said there was speculation that China is "giving up on G20" in favour of groupings like BRICS, where it is dominant.
BRICS includes Brazil, Russia, India, China and South Africa, and has agreed to add another six new members -- Saudi Arabia, Iran, Ethiopia, Egypt, Argentina and the United Arab Emirates - accelerating its push to reshuffle a world order it sees as outdated.
Russia is being represented by Foreign Minister Sergei Lavrov, who had said he would block the final declaration unless it reflected Moscow's position on Ukraine and other crises.
Russia's 2022 invasion of Ukraine has left tens of thousands of dead, displaced millions and sown economic turmoil across the world. Moscow denies committing atrocities during its conflict with Ukraine, which it terms a "special operation" to "demilitarize" its neighbour.
A French diplomat involved in the talks said the communique was "very satisfactory", and praised the language on the Ukraine war, especially the part that said nations should refrain from conquering territories by force.
"Only one country does that, it's Russia. That will help us build consensus for later," the French diplomat said.
In the absence of an agreement on the declaration, India would have had to issue a chair statement, which would mean that G20 for the first time in 20 years of summits would not have had a declaration.