President Donald Trump affirmed the US commitment to the defence of NATO allies on Thursday (local time) in a Warsaw speech that gently criticised Russia, and he said Western civilisation must stand up to "those who would subvert and destroy it".
In his second trip to Europe as president and shortly before leaving for a potentially fractious G20 meeting in Germany, Trump sought to ease the nerves of US allies after failing in May to endorse the principle of collective defence enshrined in Article Five of the Nato treaty.
As a presidential candidate Trump called Nato obsolete, but he has since changed his position on the alliance's relevance.
The president also had tough words for Russia on Thursday, though he did not fully endorse allegations, backed by US intelligence agencies, that Moscow interfered in the 2016 presidential election that he won.
Trump meets President Vladimir Putin for the first time face-to-face on Friday in Hamburg, the site of the G20 summit.
"We urge Russia to cease its destabilising activities in Ukraine and elsewhere and its support for hostile regimes including Syria and Iran, and to instead join the community of responsible nations in our fight against common enemies and the defense of civilization itself," he said.
The Kremlin said Russia was not guilty of any destabilising activity.
The brief visit to Warsaw, which included a meeting with regional heads of state, was billed by the White House as an effort to patch up relations with European allies after a tense Nato summit in May.
Trump was received by enthusiastic crowds on a central Warsaw square - some 15,000 people according to police estimates - many arriving on busses arranged by parliamentary deputies of the ruling conservative Law and Justice (PiS) party. People carried US flags or placards with photographs of Polish President Andrzej Duda and Trump. Some wore t-shirts with American flag colours and many chanted the president's name.
Trump reiterated his criticism of low defense spending levels by many European nations and praised Poland for meeting the alliance's target of spending 2 percent of economic output on defense.
"To those who would criticise our tough stance, I would point out that the United States has demonstrated not merely with words but with its actions that we stand firmly behind Article 5, the mutual defense commitment," he said to applause.
Article Five of Nato's 1949 founding charter states that an attack on any member is an attack on all, and allies must render assistance, military if need be.
The stopover was a major diplomatic coup for Poland's conservative government, which has faced mounting criticism from Brussels over its democratic record and a refusal to accept migrants fleeing war in the Middle East.
The eurosceptic administration agrees with Trump on issues such as migration, climate change, coal mining and abortion, and it wants EU institutions to give back some of their powers to national governments.
"We are against abortion, we promote life. These values are shared by President Trump. There is no other leader who would evoke God in his speeches so frequently," said Lukasz, a 30-year-old teacher from the seaside city of Szczecin, who travelled to Warsaw with 40 others.