Agencies – President Joko "Jokowi" Widodo on Wednesday officially handed over the G20 presidency to India at the end of a summit of the bloc's leaders in Bali.
The Group of 20 major economies adopted a joint leaders' declaration and produced other partnerships, Jokowi said.
In the leaders' declaration G20 nations deplored Russia's aggression in Ukraine "in the strongest terms" and demanded its unconditional withdrawal in a declaration adopted at the end of a two-day summit.
The leaders of the world's biggest economies also agreed to pace interest rate rises carefully to avoid spillovers and warned of "increased volatility" in currency moves but it was Ukraine that dominated the summit on the Indonesian island of Bali.
"Most members strongly condemned the war in Ukraine," the declaration said, signalling that Russia, which is a member of G20, opposed the wording. The positions taken by China and India, which abstained from a similar UN resolution in March, were not immediately clear.
However, at least three diplomats said the statement, which recognised that "there were other views and different assessments of the situation and sanctions", was unanimously adopted.
"The use or threat of use of nuclear weapons is inadmissible," the declaration also said.
In a press conference later on Wednesday, Jokowi said the war in Ukraine was the most debated article of a declaration of G20 leaders gathered at a summit this week, while also urging all sides not to escalate tensions further.
Jokowi said missile explosions in Poland on Tuesday were regrettable. His US counterpart Joe Biden had said it was unlikely they came from Russia.
He added the war had caused devastation and huge human suffering and weighed on global economic recovery.
Earlier on Wednesday, US President Joe Biden and leaders of key allies held "emergency" talks Wednesday after a missile hit Polish territory near the border with Ukraine, the White House said.
Leaders of the European Union and all G7 countries – Britain, Canada, France, Germany, Italy, Japan and the United States – were among those at the hastily arranged meeting in Bali, where they have been taking part in a G20 summit of major economies.
The White House website called the session an "emergency roundtable." It took place behind closed doors after journalists were asked to leave.
To a shouted question from a reporter on whether he could provide an update on the missile, which killed two people in a Polish village, Biden simply answered: "No", AFP reported.