President Barack Obama told Air Force Academy cadets Thursday to learn from lessons he's picked up during eight years in office.
Throughout his 30-minute speech to the 2016 graduating class, Obama praised cadets - including those graduating with cyberwarfare degrees, a cadet Olympian and three Muslim members of the class of 2016.
"You have more than earned your motto, forged in fire and tempered in ice," he told the 812 graduates.
He said he's found that America remains an example to the rest of the world and its profile is only rising.
"The United States is better positioned to lead in the 21st century than any other nation," he said.
Obama said some of that is due to the men and women in uniform.
"It's undeniable that our military is the most capable fighting force on the planet," he said.
Obama, though, decried increasing calls for isolationism on the political right. Though he didn't mention Republican presidential front-runner Donald Trump, Obama was clearly targeting trump's "America First" policies.
"As we navigate this complex world, America cannot shirk the mantle of leadership," Obama said.
Obama criticized congressional Republicans for holding up several international pacts and criticized those who call for more forceful American military action in Syria and those - including Trump - who have advocated the use of torture.
"No element of our power is more enduring than the example we set ourselves," he said.
More than any recent speech, the academy addressed also showed Obama's clear desire to write his own legacy. There was Obama the tough guy, rattling off the names of terrorists killed in drone strikes and other actions. There was Obama the peacemaker, who said he derailed Iran's nuclear ambitions "without firing a shot" and opened doors with former U.S. enemies Cuba and Vietnam.
"We put aside 50 years of failed policies and now we're seeing Americans returning to Cuba," he said.
Obama also pointed to his efforts to combat Ebola in western Africa and said his methods have brought troops home from Iraq and Afghanistan.
And he emphasized that cadets should stay engaged in world affairs.
"It also means resisting the temptation to intervene militarily when there is a crisis or problem in the world," he said.