1 of 4
Darko Vojinovic, Associated Press
Russian President Vladimir Putin, left, attends a wreath-laying ceremony at a Russian Chapel in Kranjska Gora, Slovenia, Saturday, July 30, 2016. Slovenia, which has joined sanctions against Russia for its annexation of Crimea and meddling in Ukraine, has been very careful to portray Putin's visit on Saturday as strictly informal and not against the EU policies.

VRSIC, Slovenia — Russian President Vladimir Putin struck a conciliatory tone Saturday on a visit to Slovenia, shaking hands and honoring dead soldiers as he tested Western resolve in maintaining crippling sanctions against the Kremlin for its role in Ukraine.

Slovenia, a small Alpine nation where U.S. Republican presidential nominee Donald Trump's wife Melania was born and grew up, is a member of both the 28-nation European Union and NATO. It has kept friendly relations with Russia even as it joined EU sanctions against Moscow for its 2014 annexation of Ukraine's Crimean Peninsula and its support for insurgents in eastern Ukraine.

On only his third visit to an EU nation this year, Putin attended the centenary commemoration of a chapel in the Julian Alps that was erected in honor of over 100 Russian and other World War I prisoners of war who died in an avalanche while building a mountain road for the Austrian army in 1915.

At the small, Orthodox-style wooden church, Putin was met by Slovenian President Borut Pahor. The chapel lies at an altitude of 1,200 meters (3,940 feet) on a winding road built by prisoners for their Austrian captors, who needed it as a supply route during battles against the Italians.

In his speech in front of the chapel, Putin said Russia was ready to help strengthen security in Europe and the world.

"So that we not only remember the horrors of war, but together work on strengthening mutual understanding, trust and security in Europe and the world," he said.

Thousands of people packed in front of St. Vladimir chapel in the blazing heat as a chorus sang old Russian church songs. They greeted Putin with a long applause and loud cheers. He waved back and shook their hands.

"This chapel has become a symbol of the friendship of the Russian and Slovenian peoples, a symbol of our mutual striving for peace, cooperation and prosperity," Putin said.

He thanked Slovenians for "caring about our common history, for remembering the Russian citizens whose fate was connected with these tragic events on Slovenian soil for the sincere efforts to strengthen the foundation of European unity upon which the future of Europe should be built."

The tight security for Putin's visit included closing the country's main highway to Austria, which caused huge traffic backups.

Slovenian officials portrayed Putin's visit as strictly informal and ceremonial, but said his talks with officials would also focus on economic and bilateral issues. Putin said the talks during his eight-hour visit will include discussions on "mutual projects important for both countries."

Some Slovenian opposition parties believe Putin's visit is an attempt to create cracks in EU unity over maintaining the sanctions against Moscow.

"We knew from the start that the controversial guest would use the visit primarily to demonstrate his influence in an EU and NATO member state," said Jozef Horvat, deputy president of the New Slovenia party.

Slovenia, a country of 2 million people, split from the former Yugoslavia in 1991. It joined NATO and the EU in 2004.

Slovenia's economic ties with Moscow date back to the communist Yugoslav era and Russia is Slovenia's top non-EU trading partner. But trade between the two has dropped nearly 30 percent since the Western sanctions and Russian counter-sanctions.

Putin's visit has angered Ukrainians living in Slovenia, who protested Saturday in front of the Russian embassy in the capital, Ljubljana. Dozens of protesters held banners reading "Putin is a Terrorist" and chanted "Long live Ukraine!"

AP Writer Lynn Berry contributed from Moscow.