From George Washington and foreign entanglements to Dwight Eisenhower and the military-industrial complex, there’s a tradition of presidents on their way out the door warning the American public about threats they failed to prevent. But few presidents have ever handed the country over to as uncertain a situation as Barack Obama will soon do. This uncertainty and unease was reflected in his speech at MacDill Air Force Base in Tampa, Florida, on Tuesday, which he described to the audience of troops as “my final words as your commander in chief.”

MacDill is the headquarters of the U.S. Central Command, which has overseen the U.S. military engagements in Iraq, Afghanistan, and elsewhere in the Middle East and Central Asia. (It’s also, incidentally, the former command of Defense Secretary–nominee James Mattis.) The speech was billed as a thank you to the military for its service under the Obama administration and a defense of his counterterrorism record: He emphasized that “No foreign terrorist organization has successfully planned and executed an attack on our homeland. And it’s not because they didn’t try.”

Obama never referred to Trump directly, but much of the speech seemed aimed at him. Referring to torture, specifically waterboarding, which Trump promised to bring back during the campaign but is perhaps now wavering on after conversations with Mattis, Obama said that “at no point has anyone who worked with me told me that [prohibiting torture] has cost us good intelligence.” Perhaps prompted by Trump’s completely illegal suggestion that the U.S. should “take the oil” from the countries in the Middle East where it sends troops, Obama said, “We are a nation that won world wars without grabbing the resources of those we defeated.” Responding to any number of Trump statements about Muslim Americans, Obama said, “The United States 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 faith as they chose. The United States 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.” And in a likely response to Trump’s single-minded focus on ISIS when it comes to U.S. security priorities, Obama said:

A sustainable counterterrorism strategy requires keeping the threat in perspective. The terrorist threat is real and is dangerous. But these terrorists want to cast themselves as the vanguard of a new world order. They are not. They are thugs and they are murderers and they should be treated that way. They don’t pose an existential threat to our nation and we must not make the mistake of elevating them as if they do. That does their job for them. It makes them more important and helps them with recruitment.

At times Obama seemed to be casting his arguments in terms that might appeal to Trump. He made appeals to the bottom line, noting that, thanks to his light-footprint counterterrorism approach, which relies more on drones and special forces than large troop deployments, “We’ve accomplished all this at a cost of $10 billion over two years, which is the same amount that we used to spend in one month at the height of the Iraq war.” His argument against continuing to keep the detention center at Guantánamo Bay open was financial as well as moral, saying we’re “wasting hundreds of millions of dollars to keep fewer than 60 people in a detention center in Cuba. That’s not strength.” He also echoed one of Trump’s favorite themes by saying the U.S. “should ask allies to do their fair share in this fight.”

Much of the speech was devoted to the tricky question of legal authorization for the war on terrorism, which Obama himself has taken advantage of. “Right now we are waging a war under authority provided by Congress over 15 years ago. I had no gray hair 15 years ago,” he joked. Obama blamed Congress, saying that, “If a threat is serious enough to require the sacrifice of men and women in uniform, then members of Congress should at least have the courage to make clear where they stand.” But that’s a little unfair. It was the White House, not Congress, that first argued that the war against ISIS fell under the 2001 authorization. Even as the president has hectored Congress for not passing a new resolution, he’s been more than happy to continue and expand the war on terror under the old one.

Even before the election, Obama had made remarks suggesting that he was concerned about the unchecked power of the presidency in counterterrorism, even as his own administration significantly helped normalize that power. Those worries are more justified now that Obama is handing that power over to Trump rather than Hillary Clinton. As he put it in his speech, “the power of the presidency is awesome but it is supposed to be bound by you, our citizens.” The White House also issued an unusual 61-page document on Monday outlining the legal basis for its various counterterrorism activities, arguing for the necessity of transparency and for legal constraints that reduce “the risk of an ill-considered decision.”

The document and the speech together sure seem like an acknowledgment that Obama, partially because of his own administration’s actions, is handing unprecedented presidential powers to someone he clearly thinks is unequipped to handle them responsibly.

Obama ended his speech by urging both members of the military and American citizens to continue to “protect our Constitution among all threats foreign and domestic.” For once, the “and domestic” part didn’t feel like a throwaway line.