In Poland, hailed by Obama as world model of democratic transition, Obama said it is the responsibility of the US to support the sometimes wrenching, roiling push for democracy and human rights around the globe.

He did so while defending Poland’s security against any threats in its neighborhood, leaving no doubt about the NATO code of members: “We defend each other.”

The president sought to build his case that America and the international community have a vested stake in the Arab revolt that is defining much of North Africa and the Middle East. He said the US cannot dictate outcomes but can help, and he cited Poland as inspiration.

“Poland’s story demonstrates how a proud and determined and enthusiastic people can overcome extraordinary challenges and build a democracy,” the president said at a brief news conference as his six-day trip to Ireland, England, France and Poland neared its end.

Obama is set to return home to familiar domestic challenges over debt and the pace of job creation as the field of potential Republican presidential contenders takes shapes and draws growing attention.

Polish Prime Minister Donald Tusk said Obama’s enthusiastic visit to his country and the recognition by the United States of the importance of helping Poland have made a lasting difference. “We feel in Poland that you are one of us,” Tusk said to Obama.

Obama’s comments came on a day in which he met in this capital city with dozens of leaders of Poland’s Solidarity movement, as well as civil society leaders. Some of them have already traveled to Tunisia where popular uprisings led to the overthrow of a longtime autocrat and sparked the protest movements that still sweep through the region, often with violent results as authoritarian governments crack down.

The US president said democratic movements will endure setbacks and require more than a burst of energy. He called for institutional change with the support of the outside world, saying US support helps people realize that “change is possible.”