EDINBURGH, Scotland -- Prime Minister Justin Trudeau marked Canada's 150th birthday with the Queen Wednesday by giving her the Canadian flag that flew on the Peace Tower on Canada Day.

On a daylong stop in Edinburgh, Trudeau met with Queen Elizabeth II for a private audience at the Palace of Holyroodhouse, her official Scottish residence, where he presented her with the Maple Leaf raised last weekend.

"It was as it often is, as it always is, a warm and engaged conversation in which she displayed knowledge and interest in a wide range of global affairs and goings on in Canada," Trudeau said in a brief statement following the meeting.

The meeting was arranged to mark Canada's sesquicentennial since the Queen, 91, is no longer able to travel as far as Canada; Prince Charles and the Duchess of Cornwall had attended Canada Day events in her place.

Trudeau's conversation with the Queen began with a chat about the fact the prime minister had received an honorary doctorate from the University of Edinburgh earlier in the day.

"Probably dismays a number of my former professor to see me as a doctor now," Trudeau said as they walked together towards a sitting area.

The Queen said his getting the degree was "lovely."

While Trudeau was inside the palace, a small number of protesters approached the gates holding placards calling for an end to the "tar sands" and to grant Indigenous rights.

It was but a tiny taste of what is to come for Trudeau at the G20 summit in Germany where tens of thousands of anti-globalization protesters have already started to descend on the northern port city of Hamburg.

As many as 20,000 police have been commissioned to safeguard the event from protesters calling their demonstration "Welcome to Hell -- Don't Let Capitalism Get You Down."

One of the stated goals of the protesters is to block the roads leading into the site, given there are limited ways in and out.

Fireworks are also expected inside the meeting as the heads of 20 of the word's largest economies clash over trade, climate change and international security.

For Trudeau, and host German Chancellor Angela Merkel, it is the Paris climate change agreement they want as job one.

Merkel has been working steadily to try and isolate Trump for his decision to withdraw from the agreement, which commits countries to cutting their emissions in an attempt to keep global warming to within two degrees compared to pre-industrial levels.

Andrew Light, a senior fellow at the World Resources Institute and member of the climate change negotiation team under President Barack Obama, said the hope is that the U.S. is the only one at the G20 that won't sign the climate change section of the communique.

But, he said there is fear countries such as Russia and Saudi Arabia will use the U.S. backing away to reduce their own commitments in areas such as international climate finance, or commitments to stop funding coal development in other countries.

Environment Minister Catherine McKenna told reporters this week Canada is standing firm on Paris and pushing all other countries at the G20 to do so to.