While Obama did not directly call out Republicans, he sharply and at times sarcastically struck back at critics who have challenged his economic and national security stewardship.

In his most pointed swipe at the GOP candidates running to succeed him, he warned against “voices urging us to fall back into tribes, to scapegoat fellow citizens who don't look like us or pray like us or vote like we do or share the same background.”

His words were unexpectedly echoed by South Carolina Gov. Nikki Haley, who was selected to give the Republican response to Obama's address. Underscoring how the heated campaign rhetoric about immigrants and minorities from GOP front-runner Donald Trump in particular has unnerved some Republican leaders, she called on Americans to resist the temptation “to follow the siren call of the angriest voices.”

“No one who is willing to work hard, abide by our laws and love our traditions should ever feel unwelcome,” she said.

Focused on his legacy, Obama ticked off a retrospective of his domestic and foreign policy actions in office, including helping lead the economy back from the brink of depression, taking aggressive action on climate change and ending the Cold War freeze with Cuba.

He touted reaching a landmark nuclear deal with Iran but made no mention of the 10 American sailors picked up by Iran on Tuesday. After holding the men overnight, Tehran released the crew Wednesday.

Tackling one of the most vexing foreign policy challenges of his presidency, Obama vowed a robust campaign to "take out" the Islamic State in Iraq and the Levant (ISIL) but chastised Republicans for "over the top claims" about the group's power.

“Masses of fighters on the back of pickup trucks and twisted souls plotting in apartments or garages pose an enormous danger and must be stopped,” he said. “But they do not threaten our national existence.”

The president dismissed the idea that ISIL poses an existential threat to the U.S., saying that's the story ISIL wants to tell and the message it uses in propaganda to recruit. He said suggestions that the struggle with ISIL will develop into World War III plays into the group's hands.

Obama also criticized those who say ISIL represents Islam. He said that is a lie and that rhetoric like that pushes away allies the U.S. needs to win the fight.

He was apparently alluding to Republican politicians who have demanded Obama declare war on “radical Islamic extremists,” and he repeated his declaration that the U.S. will hunt them down and destroy them.