President George W Bush has told the Polish people that the US is committed to a strong Nato, despite divisions over the war in Iraq.
Bush called for the US and Europe to confront poverty and Aids
Standing alongside Polish President Aleksander Kwasniewski at Krakow's Wawel Castle, Mr Bush thanked Poland for its support in the war which toppled Saddam Hussein.
The US president urged unity in confronting terrorism and weapons of mass destruction and announced a new plan to fight the proliferation of chemical, biological and nuclear weapons.
He has flown on to St Petersburg to attend the city's 300-year anniversary celebrations, where he will meet for the first time since the Iraq war the European leaders who opposed military action.
'Time to unite'
Mr Bush has visited the remnants of a gas chamber and crematorium at nearby Auschwitz-Birkenau, the notorious former Nazi death camp where 1.5 million Jews and many other victims were murdered.
"This site is a sobering reminder of the power of evil and the need for people to resist evil," he said.
Mr Bush's speech was billed as a first step in healing the rift between the US and some European countries over Iraq.
"We have seen unity and common purpose. We've also seen debate, some of it healthy, some of it divisive," Mr Bush said.
"This is a time for all of us to unite in the defence of liberty, and to step up to the shared duties of free nations. This is no time to stir up divisions in a great alliance."
Mr Bush underlined the importance of Nato, saying a strong Atlantic alliance would serve security and peace.
He said the greatest threat to the "alliance of freedom" came from "a lethal combination of terrorist groups, outlaw states seeking weapons of mass destruction, and ideology of power and domination that targets the innocent and justifies any crime".
He said a new initiative was being launched to inspect planes and ships to "keep these weapons away from our shores".
The US president also called on Europe and America to unite to face challenges such as poverty and Aids.
Mr Bush, who is due to meet Israeli and Palestinian leaders next week, said he would do all he could to reach and enforce a peace agreement in the Middle East.
The BBC's Nick Walton says many Poles enjoyed the attention - and influence - that such a visit by a prominent world statesman was expected to generate.
Poland, recently classed by US Defence Secretary Donald Rumsfeld as "new Europe" in contrast to the "old Europe" of France and Germany, contributed about 200 combat troops to war in Iraq.
Polish protests against Bush's visit soon petered out
Warsaw now enjoys preferential treatment in administering and rebuilding the country.
Poland is due in a week's time to vote on European Union membership - an issue which many Poles see as the key to the country's future - and the US is keen for such a pro-American country to join the Union.
Following his visit to St Petersburg, Mr Bush will head to Evian in France to attend the G8 summit of leading industrialised nations before flying to the Middle East.
At Evian, President Bush will be grouped with the main opponents of the Iraq war and will hold a face-to-face meeting with French President Jacques Chirac.
In an interview with foreign journalists on Thursday, President Bush insisted the Evian summit would not be a "confrontational meeting", but rather how all sides would "move forward".