Whether or not the world's wealthiest countries should promise not to pay ransoms to terrorist kidnappers formed part of the discussions about international security Friday as G20 meetings got underway in Germany.

Prime Minister Justin Trudeau pledged more than a year ago to push other world leaders to stop paying kidnappers after Canadians John Risdel and Robert Hall were killed by a terrorist group in the Philippines in April and June 2016.

A Canadian official, speaking on background, said the current draft of the final document outlining what the leaders agreed to at the G20 in Hamburg currently includes the ransom discussions — at Trudeau's urging.

Risdel and Hall were kidnapped in September 2015 along with two other hostages who were later freed. The Norwegian man who was taken with them was freed after Norway paid a ransom of about US$630,000, but Canada refused to pay.

Trudeau repeated the oft-heard Canadian claim, including from his predecessor Stephen Harper, that Canada does not pay ransom because it funds terrorist activity and encourages further kidnappings.

There has been language about ransom payments in the G20 communiques in both 2015 and 2016, but neither summit resulted in a full pledge not to pay them at all. The 2013 G8 summit made such a pledge, but it was not heeded by all signatories.

Canada has long had an unofficial policy against paying ransoms but has done so on some occasions, including in 2009 when it paid $1.1 million to an al-Qaida affiliate in Africa to free diplomats Robert Fowler and Louis Guay.

Robert Hall, left, seen in a video uploaded to YouTube, with John Ridsdel, right. The pair were executed by Abu Sayyaf earlier this year after the Canadian government refused to pay their ransom. (Site Intelligence Group/YouTube)

Trudeau also pushed for the language about terrorism to reflect a commitment to diversity and inclusiveness. Officials wouldn't further explain that component, but it comes as Trump finally gets to impose at least part of his ban on travellers from six mainly Muslim countries in the guise of national security.

Trudeau has never publicly criticized Trump for the ban, although he did tweet shortly after it first came to light, promising that Canada would remain open to all refugees regardless of their faith.

Trump was at the table during the security discussions, which also focused on combating the threat posed by the militant Islamic State group.

Indian Prime Minister Narendra Modi told Trudeau at the start of a bilateral meeting Friday that he was very happy to hear Trudeau's "interventions" in the terrorism discussions and would be backing him all the way.

"The wavelength was the same, yours and mine," Modi told Trudeau in Hindi.

Trudeau chats with Indian Prime Minister Narendra Modi during their bilateral meeting at the G20 summit in Hamburg, Germany, Friday. (Ryan Remiorz/Canadian Press)

Trump was also pushed on his position on climate change and the Paris agreement.

Foreign Affairs Minister Chrystia Freeland, who is attending the meeting with Trudeau, said the U.S. position on that issue was no surprise, nor was it expected to change.

In May, Trump made good on a campaign promise to withdraw the U.S. from the Paris climate change agreement. He was already the only non-Paris supporter at the G7 meeting in May, and German Chancellor Angela Merkel is trying to construct a 19-to-1 scenario in the communique that will be made public Saturday.

As part of her G20 presidency, Merkel produced an energy action plan as an appendix to the communique which could end up calling for everything from an end to fossil fuel subsidies around the world to requiring corporations to take climate change impacts and risks into account during financing decisions.

Merkel had a one-on-one with Trudeau early Friday where much of the discussion focused on strategies to get as many countries as possible on board the climate change action train.

Whether she will get everyone but Trump on her side may depend on Russian President Vladimir Putin. He met privately with Trump on Friday, a much-anticipated meeting given long-standing allegations of Russian meddling in the U.S. election and of collusion with Russia by American officials.

That meeting, which lasted more than two hours, included Trump pressing Putin on the election issue, as well as discussions about Russia's presence in Ukraine and the conflict in Syria.

Trudeau greets German Chancellor Angela Merkel during a bilateral meeting at the G20 summit Friday in Hamburg, Germany. (Ryan Remiorz/Canadian Press)

Their meeting came at the same time as the afternoon climate change discussion session, which angered German officials.

Russia is one of the countries observers fear may be weakening its resolve on its Paris commitments in the wake of Trump's decision to withdraw. Russia is not among the 152 countries who have so far ratified the accord.

Trudeau also met privately with French President Emmanuel Macron, where the focus was largely on climate change. He will meet Mexican President Enrique Pena Nieto on Saturday before the meeting concludes.

Several people dragged away as anger mounts at G20 meeting 0:51

Outside the meeting, an estimated 100,000 protesters continued demonstrating against what they consider an offensive gathering of the world's wealthiest nations, which make all the decisions at the expense of disadvantaged people.

Most of the protesters marched peacefully, but violence broke out repeatedly, with cars set ablaze and rocks thrown through storefront windows.

The zone around the conference centre where the meeting was being held was tightly guarded by thousands of police who lined the streets with cars and blocked passage with a giant water cannon.

Many Hamburg stores chose to stay closed during the summit and those in the vicinity of the protests, including an Ikea, boarded up their windows and doors.