Leaders at the G20 have all agreed to a final communique after what Canadian government officials describe as months of 鈥渧ery difficult鈥 negotiations.

Indian Prime Minister Narendar Modi announced the consensus during a G20 session on Saturday afternoon.

鈥淥n the back of the hard work of all the teams, we have received consensus on the G20 Leaders Summit Declaration,鈥 Modi announced during the first day of the G20 summit in New Delhi.

Canadian government sources with knowledge of the negotiations 鈥 who were not authorized to speak publicly 鈥 described the negotiations as a challenge.

鈥淲e went into the negotiation knowing it would be difficult and we held as firm as we think we could,鈥 one senior government source said.

At last year鈥檚 G20 in Bali, Indonesian President Joko Widodo clinched consensus at the last minute. On Ukraine, largely viewed as the most contentious issue, the Bali Leaders' Declaration states that "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 declaration also includes a caveat that "there were other views and different assessments of the situation and sanctions."

This year鈥檚 includes language surrounding Russia鈥檚 invasion of Ukraine that appears to take a softer stance than the Bali declaration. Many are calling it a step back since the joint declaration does not condemn Russia and instead calls for the cessation of military destruction or other attacks on relevant infrastructure.

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

The India Declaration goes on to say that the use or threat of nuclear weapons is 鈥渋nadmissible.鈥 However, the only specific reference to Russia is a call to fully and effectively implement the Black Sea initiative to allow for the unimpeded delivery of grain. Russia backed out of the wartime export deal in July after saying its demands on its own agricultural exports had not been met.

"We ... welcome all relevant and constructive initiatives that support a comprehensive, just, and durable peace in Ukraine,鈥 the statement goes on to say.

Canada went in to the negotiations seeking language that was 鈥渁s strong as possible鈥 while also looking to garner a consensus. However, the negotiations were made more complex by the fact that Russia, and other nations aligned with Russia, have a seat at that table.

While the majority of the countries around the G20 table were expecting strong text around Ukraine, government officials say there are a 鈥渘umber of countries鈥 who felt the G20 is not the place to have 鈥渢his discussion.鈥 The officials would not say which countries other than Russia\were pushing back against stronger language.

鈥淭here are some countries that recognize that we need to talk about it, but want to minimize that discussion,鈥 a Canadian government source said. 鈥淲hy? Because they don鈥檛 want dissension at the table.鈥

Asked whether the language was strong enough, senior government sources said there is always room for improvement.

鈥淲e would always wish it could be stronger,鈥 the senior official said.

With files from The Canadian Press