LONDON -- Prince William made an unannounced trip to Poland on Wednesday to thank British and Polish troops involved in providing support to Ukraine, before meeting refugees who have fled the conflict with Russia to hear of their experiences.

The heir-to-the throne travelled to Rzeszow in southeast Poland where he was to meet the country's Defence Minister, Mariusz Blaszczak, and speak to members of the Polish defence force and British troops based there, his office said.

The British deployment in Poland is part of a NATO build-up of strength on its eastern flank following Russia's invasion of Ukraine.

The royal's trip, which had not been publicized in advance, is taking place under tight security, but his spokesperson said William was very keen it went ahead, and that it was something he had requested.

"I’m here because I want to personally thank the Polish and British troops working in close and crucial partnership," William said in a statement to Polish media. "I also want to pay tribute to the inspiring humanity of the Polish people. You have opened your hearts as much as your homes."

After the military engagements, the Prince of Wales is due to travel to Warsaw to visit an office block which had been converted into an accommodation centre housing about 300 Ukrainian women and children Ukrainians who have fled the war.

On Thursday, the prince will lay a wreath at the Polish capital's Tomb of the Unknown Soldier, where his late grandparents, Queen Elizabeth and her husband Prince Philip, also laid a wreath during their state visit in 1996, before he has a meeting with the Poland's President Andrzej Duda.

"Tomorrow, as I meet President Duda, I’ll reiterate the profound relationship shared by our two nations and underline my continued support and gratitude to the Polish people," he said.

His trip, William's first since he travelled there with his wife Kate in 2017, will conclude with a visit to a local food hall where he will greet young Ukrainian refugees who have settled in Warsaw.

(Reporting by Michael Holden; editing by Raissa Kasolowsky)