NEW DELHI, Sept 9 (AFP) - The Group of 20 nations adopted a consensus declaration on the opening day of 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 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.

"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 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 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".