Surrounded by throngs celebrating Poland’s 25 years of democracy, President Obama on Wednesday pledged to uphold the United States’ longtime commitment to the defense of Eastern Europe against new threats, using the opportunity to deliver a resounding endorsement of democratic movements across the world.

“Throughout history, the Polish people were abandoned by friends when you needed them most,” Obama said. “I have come to Warsaw today — on behalf of the United States, on behalf of the NATO Alliance — to reaffirm our unwavering commitment to Poland’s security.”

Speaking at the “Freedom Day” event in a historic square by the Royal Castle, the president said he would use the full might of the American armed forces to protect Poland and other Eastern European allies, and he called out Russia as a threat to regional security and democracy.

“Our free nations will stand united so that further Russian provocations will only mean more isolation and costs for Russia,” he said. “We refuse to allow the dark tactics of the 20th century to define the 21st.”

The remarks were a startling reminder that even as Obama tries to turn the page on more than a decade of war and point U.S. foreign policy in a new direction, he is consumed by the challenges of predecessors from decades ago: namely, defending democracy in Europe. Even as he declares “the days of empires and sphere of influences are over,” he is still fighting an old superpower that is practicing the geopolitical warfare of the last century.

On the second day of his European tour, Obama spoke at a moment of deep unrest. Russia’s annexation of Ukraine’s autonomous Crimea region and support for pro-Russian separatists in eastern Ukraine have upended the widely held belief that territorial sovereignty was inviolable in the Europe of the 21st century.

But what was striking about the speech, a centerpiece of Obama’s trip to Europe this week, was not just another commitment to regional security but his broader message about supporting the aspirations of democratic movements across the world.

Obama did not describe, however, how his administration would further the cause of freedom across the world — a notoriously difficult challenge at the same time it is trying to make progress in other foreign policy areas, including counterterrorism and trade.

“We stand together because we know that the spirit of Warsaw and Budapest and Prague and Berlin stretches to wherever the longing for freedom stirs in human hearts, whether in Minsk or Caracas, Damascus or Pyongyang,” Obama said.

The president said this was especially clear in Ukraine, where he drew a direct line between the leaders of Poland’s democratic movement in the 1980s and those who protested the previous pro-Moscow government in Ukraine, calling them “the heirs of Solidarity — men and women like you who dared to challenge a bankrupt regime.”

“Robbed by a corrupt regime, Ukrainians demanded a government that served them. Beaten and bloodied, they refused to yield,” Obama said.

Earlier in the day, Obama met with Ukrainian President-elect Petro Poroshenko, who won the country’s May 25 presidential election, and said he represents a new future for Ukraine. Poroshenko, Obama said at the end of a bilateral meeting, “understands the aspirations and hopes of the Ukrainian people.”

On Tuesday in Warsaw, Obama released a $1 billion proposal to bolster the U.S. military presence in the region in hopes of reassuring the Polish people and other Eastern Europeans that the United States remains committed to their common defense.

The “Freedom Day” event in Warsaw’s Royal Square, representing 500 years of Polish history, marks the unexpected victory of the nation’s Solidarity movement in parliamentary elections held on June 4, 1989. The election inaugurated a series of political and economic reforms that have brought prosperity to Poland and made it one of the biggest success stories of the post-Cold War era. Poland joined the North Atlantic Treaty Organization in 1999 and the European Union in 2004.

In recent months, many Poles have expressed frustration that the United States has not been more aggressive in building an Eastern European military presence that could check Russia’s appetite for influence. Nobel Peace Prize laureate Lech Walesa, who helped bring democracy to Poland and was its second president, told the Associated Press late last month that “the world is disorganized and the superpower is not taking the lead.”

“It is difficult not to notice that something has changed to the east of the borders of NATO, that again they’re having to do with the aggression with the use of armed forces against one’s neighbor,” Polish President Bronislaw Komorowski said Tuesday during a joint news conference with Obama. “A few years ago it was Georgia. Now it is Ukraine, with a special focus on Crimea.”

Obama tried to address the worries by releasing the $1 billion proposal and affirming his commitment to Poland’s defense. The U.S. money proposed by Obama would cover a continuation, likely into next year, of temporary measures designed to send a signal to Russia and convince Eastern European members that NATO has their back. It includes ongoing land, sea and air deployments, as well as moving additional resources closer to the Russian border and providing more aid to non-NATO members Ukraine and Georgia.

Also on Tuesday, Obama warned Russian President Vladimir Putin that he will face additional sanctions if he escalates the situation in Ukraine and urged him to take steps to resolve it diplomatically. “We have prepared economic costs on Russia that can escalate if we continue to see Russia actively destabilizing one of its neighbors,” Obama said.

Despite public statements of support, Poland’s anxiety is unlikely to have been alleviated by Obama’s trip here. Many Poles favored even more aggressive language and a permanent military presence by the United States and Eastern European allies.

Obama leaves Poland on Wednesday afternoon to travel to Brussels for a Group of Seven meeting, where Ukraine is likely to remain the dominant subject. He will stay overnight Thursday in Paris.

On Friday, after bilateral meetings with British Prime Minister David Cameron and French President Francois Hollande, Obama is scheduled to attend and make remarks at D-Day commemorations at Omaha Beach in Normandy, paying tribute to U.S. service members who helped liberate France during World War II.

In Normandy, he is expected to cross paths with Putin, although he is not planning to hold any talks with him.