Leaders of the Group of 20 major economies on Wednesday barely adopted a declaration denouncing the ongoing war in Ukraine by diplomacy and compromise, following sharp differences between Western democracies and Russia over how to describe the aggression.

The declaration issued after their summit in Indonesia's Bali said, "Most members strongly condemned the war in Ukraine," demanding Russia's "complete and unconditional withdrawal" from its neighbor. But it also said, "There were other views and different assessments of the situation and sanctions."

Russia eventually agreed with the United States and European countries to issue the document on condition that the leaders clarify that members of the group have remained at odds over how to interpret the impact of the war on the international community, according to officials involved in the two-day meeting.

"I express my high appreciation to those attending who have shown their flexibility so that the declaration could be agreed and adopted," Indonesian President Joko Widodo said.

Its adoption came after the United States and other Group of Seven nations intensified their criticism of Russia after a missile landed in Poland, a member of the North Atlantic Treaty Organization.

Russian state-run media had earlier Wednesday said it was uncertain whether the G-20 leaders would agree on a communique despite details having been already worked out.

Later in the day, however, the Associated Press reported that initial findings suggested the missile was fired by Ukrainian forces at an incoming Russian projectile, apparently easing tensions between Moscow and Western countries centering on the United States.

Poland's Foreign Ministry said the missile made by Russia crossed into its territory and killed two people Tuesday, as Ukrainian energy facilities were reportedly pounded by the biggest barrage of missiles yet.

On Wednesday morning, leaders of the G-7 nations and other countries held an emergency gathering on the Indonesian resort island. Following the meeting, U.S. President Joe Biden said it was "unlikely" that the missile was fired from Russia.

Meanwhile, Widodo, the host of this year's G-20 summit, had voiced unwillingness to discuss the missile strike in Poland.

"The G-20 is an economic, financial and diplomatic forum, not a political forum," the president said, adding, "Here, we talk about the economy."

At the closing of the first G-20 summit since Russia launched a major attack on Ukraine in February, Widodo, nevertheless, called for the end of the war, with the declaration warning that the use of nuclear weapons is "inadmissible" amid fears that Russian President Vladimir Putin might use a tactical nuclear device for a limited strike.

Japanese Prime Minister Fumio Kishida told reporters after the summit that it was significant that the leaders censured the war in the statement.

The G-20 members began holding summits in 2008 amid the global financial crisis in the wake of the collapse of Lehman Brothers in September that year.

Putin skipped the last G-20 meeting, while Biden and Chinese President Xi Jinping participated in the same face-to-face international gathering for the first time since the U.S. leader took office in January 2021.

Russia, whose economy has been hit hard by sanctions imposed by Western nations, sent Foreign Minister Sergey Lavrov to Bali on behalf of Putin.

On Tuesday, Lavrov was quoted by Russia's Tass news agency as saying at a press conference, "The West added the phrase that 'many delegations condemned Russia,' (but) we noted that alternative views were also outlined." He left Indonesia later in the day.

Despite a rift between Western democracies and what they call autocratic countries over Russia's aggression against Ukraine, most G-20 members agreed to lambaste Russia over the war.

But several others sought to refer to opposition to sanctions against Moscow, according to the officials.

At their summit, the G-20 countries, some of which have been suffering from accelerating inflation, also made concessions on the reference to rising global energy and food prices, caused largely by the Ukraine crisis.

While the United States and other members of the G-7 industrialized nations such as Japan have been substantially cutting off trade with Russia, China and India, the world's two most populous countries, still import natural resources from Russia.

In the declaration, the G-20 said it has "witnessed the war in Ukraine further adversely impact the global economy," vowing to use "all available tools to mitigate downside risks."

In a bid to spur economic growth, the G-20 promised to "take action to promote food and energy security and support stability of markets" as well as "strengthen multilateral trade and resilience of global supply chains."

The G-20 has managed to endorse a statement at every meeting since its inaugural summit, but conflict among members this time would further spark skepticism about the international framework's ability to find common ground, political analysts said.

Along with the G-7 -- Britain, Canada, France, Germany, Italy, Japan and the United States plus the European Union -- the G-20 includes Argentina, Australia, Brazil, China, India, Indonesia, Mexico, Russia, Saudi Arabia, South Africa, South Korea and Turkey.

Related coverage:

G-7, NATO affirm cooperation after missile hits Poland amid Russia war

G-20 at odds over war in Ukraine at 1st summit since Russia invasion

U.S., Japan, others to help Indonesia with $20 bil. climate financing