President Obama used his final national security speech to not only thank U.S. troops for their work over the past eight years, but also appeared to send a message to his successor, President-elect Donald Trump.

In his speech at the MacDill Air Force Base in Tampa, Fla., on Tuesday, Obama seemingly touched on a variety of concerns about the president-elect that emerged during the campaign trail, including Trump’s support of torture and generalizations about the Muslim community.

The president also said the U.S. should uphold its values both at home and abroad, explicitly saying that stigmatizing Muslims would be counterproductive to the larger goal of fighting terrorism.

“We are fighting terrorists who claim to fight on behalf of Islam, but do they do not speak for over a billion Muslims around the world,” Obama said. “If we stigmatize Muslims, that just feeds the terrorist narrative.”

The U.S., he added, is not “a country that imposes religious tests as a price for freedom.” Aides to the Trump transition team have suggested that under the incoming administration, there could be a registry for Muslims in the U.S. Obama also said the U.S. is “a society where we can criticize a president without threat of retribution.”

“We are a nation that—at our best—has been defined by hope, and not fear,” Obama said.

The president also spoke to what he believes should be the path forward for the future administration, from keeping the threat “in perspective,” to upholding American values by favoring seeking justice instead of torture to remaining transparent. The president said his administration’s decision to release a memo that outlined the legal framework around military action—which many viewed as a hint to Trump—was an example of that in practice.

At the beginning of his speech, Obama said the U.S. should be proud of the work his administration has done on national security during what is being billed as his final speech on the subject. “We should take great pride in the progress that we’ve made over the past eight years,” he said.

In touting his record, the president said that there has been no “successful attack” carried out by a major terrorist organization on the U.S. homeland over the past year years and that new partnerships have been built overseas. “All of this progress is due to the work of men and women like you,” the president told the crowd of troops. “It’s thanks to you.”

The president acknowledged that there have been setbacks. And though there have been no attacks at the same level as 9/11, he said, the threat of terrorism has and will endured due to the spiderweb reach of groups like ISIS that use social media to recruit and spread hateful ideology. Obama said the threat is compounded by the ease with which people in the U.S., including those with terrorist leanings, can get their hands on powerful weapons. “To say that we’ve made progress is not to say that the job is done. We know that the threat persists,” Obama said. “We have to take a long view of the terrorist threat, and pursue a smart strategy that can be sustained.”

Get our Politics Newsletter. The headlines out of Washington never seem to slow. Subscribe to The D.C. Brief to make sense of what matters most. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

Contact us at letters@time.com.