Prime Minister Justin Trudeau has paid a quick visit to Canadian military trainers in western Ukraine.

The excursion to the training base was meant to show appreciation to the Canadian troops from CFB Valcartier, Que., who are stationed there. It was also meant to show solidarity with the forces fighting to defend the embattled country.

It was a low-key trip, capping a whirlwind of meetings at both the NATO Summit in Warsaw over the weekend and in Kyiv on Monday.

Ukraine Trudeau 20160712

Trudeau's son Xavier accompanied his father on his official visit to Ukraine. (Adrian Wyld/Canadian Press)

The prime minister's motorcade rolled past summer fields that were thick with Ukrainian troops in the midst of training.

There were towers with helicopter frames for rappelling training, mock tanks and a demonstration of an assault on building.

All of it took place under the watchful eye of Canadian soldiers, many of whom honed their skills on the battlefields of Afghanistan.

Military experts say that after Crimea fell to the Russians, the Ukrainian army, which was vast but poorly funded and poorly led, nearly collapsed in the face of the insurgency in Ukraine's East. 

Many of the soldiers at the Canadian course are conscripts who've had only a few weeks of basic training.

They've already done tours at the front, but are pulled back to be instructed by Canadian, American and British trainers.

Trudeau addresses Canadian troops in Ukraine2:22

Fighting for 'values and principles'

Trudeau came to this multinational training base at Yavoriv one day after Ukrainian President Petro Poroshenko personally asked him to extend the deployment of the roughly 200 Canadian troops who've been here since last year, training regular army Ukrainian troops in the finer points of combat and roadside bomb detection.

Trudeau's visit was conducted under tight security. 

The military had special precautions in place and made sure that the travelling media were read the riot act and told not to photograph or video the faces of Canadian troops, for security reasons.

Officials said the measures were to prevent the soldiers and families from being harassed online and possibly targeted back home by anyone with a grudge. 

Trudeau told the troops that their role is an important one.

"Obviously the conflict in the East is a real challenge, as Ukraine is going through significant political and economic reforms," he said. "Demonstrating the support of the international community is absolutely essential."

But Trudeau noted it is the "people to people contacts" that are vitally important, and that is what the soldiers are doing through their training and encouragement.

"The reason we're here supporting Ukraine is not because Ukraine is a good friend to Canada and the Ukrainian people  are good friends to us. It's because the values and the principles they are fighting for are the values and principles that we stand for and we fight for."

Ukraine Trudeau 20160712

Women in traditional dress wait for Trudeau and his son Xavier as they arrived in Lviv, Ukraine, on Tuesday. (Adrian Wyld/Canadian Press)

Troops share information, tactics

Poroshenko personally thanked Trudeau for the Canadian contribution at meetings Monday in Kyiv.

He stressed that the Canadian military also is learning by having a front-row seat to view Russian army tactics.

"This is the win-win situation of this training operation, because our armed forces share information about hybrid war and the tactics they do," he said at the start of their meeting.

Other Ukrainian leaders say the Canadians have been generous with their knowledge and advice.

Poroshenko was pleased that Trudeau took the time to visit the training base, where the U.S. and the U.K. also have soldiers stationed.

On Monday, Trudeau witnessed the signing of a free trade deal with Ukraine and held bilateral talks with Poroshenko.

Later that day, he met with civil society leaders and pro-reform figures.

"Thank you for reminding everyone around the world that democracy, and justice, and the rule of law and opportunity for citizens are worth fighting for," he said.

Ukraine Canada

Trudeau and Ukraine's Prime Minister Volodymyr Groysman, left, paid respects to the Heavenly Hundred during a ceremony Monday in Kyiv, at the monument dedicated to those who died in anti-government protests from 2013-14. (Sergei Chuzavkov/Associated Press)