World leaders will state that today’s era “must not be of war” and will condemn threats to use nuclear weapons at the G20 summit in Bali, reflecting rising global anxiety around Russia’s war against Ukraine.

A draft communiqué agreed by diplomats, seen by the Financial Times and confirmed by two delegations, said: “Most members strongly condemned the war in Ukraine and stressed it is causing immense human suffering and exacerbating existing fragilities in the global economy.”

The language regarding the war and Moscow’s repeated use of nuclear rhetoric is stronger than western officials forecast, and underscores rising anxiety in non-western states about Vladimir Putin’s invasion and its widespread effects.

Xi Jinping, China’s president and Putin’s most important global ally, said in his speech to other leaders that the G20 “must resolutely oppose the attempt to politicise food and energy issues or use them as tools and weapons”, in some of his strongest language on the war’s fallout.

The Chinese leader said the crisis in food and energy markets was caused by “interrupted supply chains” and added that “unilateral sanctions must be removed”. Western countries maintain that Russia’s war has cut off Ukraine’s food exports, while Moscow has blamed western sanctions for restricting its own shipments.

Putin chose not to attend the summit in Bali, Indonesia, instead sending his foreign minister Sergei Lavrov, who is set to leave the event a day early on Tuesday night.

Western leaders used their opening speeches to call on other countries, many of which have declined to publicly condemn Putin’s invasion, to step up their pressure on Moscow to end the conflict.

“The use or threat of use of nuclear weapons is inadmissible. The peaceful resolution of conflicts, efforts to address crises, as well as diplomacy and dialogue, are vital. Today’s era must not be of war,” the draft statement said.

The communiqué was agreed by country delegates on Monday night after days of wrangling between western officials and those from Russia and China. It will be formally adopted by G20 leaders on Wednesday, the second day of the summit.

The document’s language “represents quite a diplomatic victory for us”, said a western official involved in the negotiations.

Officials had earlier warned that Russia’s objection to condemnation of the war and China’s support for Moscow could mean the G20 summit in Bali, Indonesia, risked being the first to fail to agree on a joint statement, as western leaders sought to rally support for Kyiv and condemnation of Moscow.

The G20 “will make clear that Russia’s war is wreaking havoc for people everywhere”, a senior US official said, adding that there was a growing trend of “countries from different parts of the world” speaking out against the conflict.

The Indian delegation played a big role in achieving consensus among member states over the wording that criticised the Russian invasion, according to three officials with knowledge of the negotiations. The language of the draft statement echoed Indian prime minister Narendra Modi’s words to Putin in September by saying “now is not the time for war”.

In a special video address to leaders on Tuesday morning in a session dedicated to the war and its impact on global food and energy markets, Volodymyr Zelenskyy, the Ukrainian president, pointedly addressed “leaders of the G19” in a snub to Russia and reiterated demands for Moscow to withdraw its troops from his country.

“I want this aggressive Russian war to end justly and on the basis of the UN charter and international law,” he said. Zelenskyy added that Ukraine should not be offered peace deals that would compromise its “conscience, sovereignty, territory and independence”.

Lavrov stayed in the room during Zelesnkyy’s speech and western leaders remained as Lavrov spoke, according to people present.

The draft communiqué stated that the war in Ukraine was “constraining growth, increasing inflation, disrupting supply chains, heightening energy and food insecurity, and elevating financial stability risks”.

It added: “There were other views and different assessments of the situation and sanctions.”

In his opening address to the summit, host Joko Widodo, the Indonesian president, warned fellow leaders: “If the war does not end, it will be difficult for us to take responsibility for the future.”

Tuesday afternoon’s session among G20 leaders will focus on global health, followed by a formal evening reception.