Prime Minister Justin Trudeau said he had a "warm and engaged conversation" with Queen Elizabeth during a private meeting in Edinburgh Wednesday.

In brief remarks outside the Queen's official Scottish residence, the Palace of Holyroodhouse, Trudeau also said he offered the monarch one of the Canadian flags that flew above the Peace Tower on July 1, the 150th anniversary of Confederation.

"It was as it often is, as it always is, a warm and engaged conversation in which she displayed knowledge and interest on a wide range of global affairs and goings-on in Canada," Trudeau said. "It's always a pleasure to meet with her."

Trudeau did not take questions.

The PM speaks to reporters in Edinburgh after an Audience with the Queen 0:41

It was Trudeau's second private audience with the Queen since taking office in 2015, and comes largely because she was unable to travel to Canada herself to mark Canada's 150th birthday.

During a short photo-op before the meeting, Trudeau drew a laugh from the Queen as he told her about his first official appointment after his arrival in Scotland.

"I've been offered an honorary degree at the University of Edinburgh, which probably dismays a number of my former professors to see me as a doctor now, even honorary," Trudeau said.

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

Trudeau received the honorary doctorate in recognition of his advocacy for equality and diversity during a ceremony earlier Wednesday at the university.

Prime Minister Justin Trudeau takes part in the convocation ceremony where he also received a honorary degree at the University of Edinburgh. (Ryan Remiorz/Canadian Press)

It is Trudeau's first honorary degree and comes on the second full day of his trip to Europe this week for bilateral meetings in Ireland and the G20 summit in Germany.

Dressed in a red and orange robe, Trudeau told graduates of the school of social and political sciences to go out and make the world proud.

While Trudeau was inside the palace meeting with the Queen, 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.

The audience was at Edinburgh's Holyrood Palace 0:49

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 too.