WARSAW, Poland – 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 near the Royal Castle, Obama said he would use the full might of the U.S. 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."

Old challenges and words

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.

Russia's annexation of Ukraine's Crimea region and support for pro-Russian separatists in eastern Ukraine have upended the belief that territorial sovereignty is inviolable in the Europe of the 21st century.

What was striking about the speech was not just another commitment to regional security, but his broader message about supporting the aspirations of democratic movements worldwide.

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," he said.

Praise for Ukrainians

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," he said.

Obama met with Ukrainian President-elect Petro Poro­shenko, who won the country's May 25 presidential election, and said he represents a new future for Ukraine. Poro­shen­ko, Obama said at the end of the meeting, "understands the aspirations and hopes of the Ukrainian people."

Obama traveled to Brussels, Belgium, later Wednesday for a Group of Seven meeting, where Ukraine is likely to remain the dominant subject.

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

He is expected to cross paths with Putin but does not plan to hold any talks with him.