ANNAPOLIS, Maryland (AP) — President Joe Biden told Naval Academy graduates Friday that they will be “representatives and defenders of our democracy,” as free societies are under threat from Russia's invasion of Ukraine to China's maritime expansion.

Delivering a commencement address to more than 1,000 newly commissioned ensigns and second lieutenants at Navy-Marine Corps Memorial Stadium, Biden said the Western response to Russian President Vladimir Putin's “brutal” war in Ukraine shows the world is aligning not on geography, “but in terms of values.”

He called the invasion, “A direct assault on the fundamental tenets of rules-based international order,” adding, “that’s the world you’re graduating into.”

“The actions taken by Putin were an attempt, to use my phrase, to Finland-ize all of Europe, to make it all neutral,” Biden said. "Instead, he NATO-ized all of Europe.”

Biden told graduates that while they will learn to fly the most advanced planes, staff cutting-edge ships and utilize novel technologies, “The most powerful tool that you’ll wield is our unmatched network of global alliances and the strength of our partnerships.”

The president told graduates that they will “defend the international rules of the road,” particularly in the Indo-Pacific region where they will be called on to “ensure freedom of navigation in the South China Sea and beyond.”

“These longstanding maritime principles are the bedrock of a global economy and of global stability," he said. “You’re going to help knit together our allies in Europe with our allies in the Indo-Pacific.”

Biden did not address two mass shootings in as many weeks in his remarks. He, along with first lady Jill Biden, will visit Uvalde, Texas on Sunday to console grieving families after Tuesday’s shooting at an elementary school that killed 19 children and two teachers, the White House said.

Biden's remarks to the Naval Academy marked his first commencement address of the year. He is also set to deliver remarks at Saturday’s graduation ceremony at the University of Delaware, his alma mater.

The president opened his speech by paying tribute to the class of 2022's resilience in the face of the COVID-19 pandemic and with a customary pardoning of any minor infractions made by midshipmen during their time in the academy.

He also paid tribute for former Republican Sen. John McCain, who is interred on the grounds of the academy, saying, “Being here I can’t help think of John and how the naval academy meant so much to him.”

Copyright 2022 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed without permission.