Late on Tuesday afternoon, President Obama flew down to Tampa Bay, Florida, to speak at MacDill Air Force Base in what would be his final address to a uniformed military audience as their commander in chief. The speech was billed as an address on his counterterrorism legacy — and for the most part, it was. Much of the speech was dedicated to lengthy defenses of Obama’s approach to fighting ISIS (persuasive) and his 2009 troop surge in Afghanistan (less so).

But the part where Obama’s speech really came alive — where I sat up in my seat and started really paying attention — was the very end. That’s because Obama’s closing passage was a stirring defense of American values — and an unmistakable repudiation of his successor’s vision for the country.

Now, Obama never actually mentioned Donald Trump by name, in keeping with his general approach of publicly wishing Trump the best of luck. But in his closing remarks, Obama laid out a description of several core American values — religious freedom, free speech, an international order based on rules and law — that directly contrast with Trump’s anti-Muslim, anti–free press, pro–stealing Iraq’s oil vision for America.

“Let my final words to you, as your commander in chief, be a reminder of what it is that you’re fighting for — what it is that we are fighting for,” Obama told the assembled service members. And then he let Trump have it:

The United States of America is not a country that imposes religious tests as a price for freedom. We’re a country that was founded so that people could practice their faiths as they choose. The United States of America is not a place where some citizens have to withstand greater scrutiny, or carry a special ID card, or prove that they’re not an enemy from within. We’re a country that has bled and struggled and sacrificed against that kind of arbitrary rule — here in our own country and around the world. We’re a nation that believes freedom can never be taken for granted, and that each of us has a responsibility to sustain it. The universal right to speak your mind, in protest of authority. To live in a country that’s open and free — that can criticize our president without retribution. A country where you’re judged by the content of your character, rather than what you look like or what you worship or what your last name is or where your family came from. That’s what separates us from tyrants and terrorists. We are a nation that stands for the rule of law and strength in the law of war. When the Nazis were defeated, we put them on trial. Some couldn’t understand that; it had never happened before. But as one of the American lawyers who was at Nuremberg says, “I was trying to prove that the rule of law should govern human behavior.” And by doing so, we broadened the scope and reach of justice around the world. Held ourselves out as a beacon and an example for others. We are a nation that won world wars without grabbing the resources of those we defeated; we helped them rebuild. We didn’t hold on to territory, other than the cemeteries where we buried our dead. Our greatest generation fought and bled and died to build an international order of laws and institutions that could preserve the peace, extend prosperity, and promote cooperation among nations. And for all of its imperfections, we depend on that international order to defend our freedom. In other words, we are a nation that at our best has been defined by hope and not fear. A country that went through the crucible of a civil war to offer a new birth of freedom. That stormed the beaches of Normandy, climbed the beaches of Iwo Jima, that saw ordinary people mobilize to extend the meaning of civil rights. That’s who we are; that’s what makes us stronger than any act of terror. Remember that history. Remember what that flag stands for. For we depend on you — the heirs to that legacy, our men and women in uniform and the citizens who support you. To carry forward what is best in us, that commitment to a common creed. The confidence that right makes might, not the other way around. That’s how we can sustain this long struggle. That’s how we’ll protect our country. That’s how we’ll protect our constitution against all threats, foreign and domestic. I trust that you will fulfill that mission, as you have fulfilled all others. It has been the greatest honor of my life to serve as your commander in chief; I thank you for all that you have done and all you will do in the future. May God bless you, may God bless our troops, and may God bless the United States of America.

Obama’s address contrasted Trump’s vision for America with the values American soldiers have stood for, casting Trump outside the tradition of those who vanquished slavery and Nazi Germany. In one of very last sentences, Obama reminded the soldiers of their oath to protect the US Constitution against its enemies, “foreign and domestic” — a unnecessary reference that serves only to highlight that threats to American values can come from within as well as without.

This isn’t the first time a president has left office by warning of a threat inside America — think of George Washington’s farewell speech advising against “entangling alliances,” or Dwight Eisenhower coining the now-famous term “military-industrial complex” in his closing speech. But it’s one thing for such a warning to be directed at an abstract concept — and quite another for it to be directed at the 45th president of the United States.