Former President Barack Obama sharply criticized President Donald Trump in a speech on Friday saying that Trump is “capitalizing on resentment that politicians have been fanning for years,” CNN reports.

Obama spoke to thousands of students at the University of Illinois-Urbana Champaign and mentioned Trump by name for the first time since leaving The White House last year and blasted Republicans politicians in the process.

“It did not start with Donald Trump, he is a symptom, not the cause. He is just capitalizing on resentment that politicians have been fanning for years,” said Obama. “A fear, an anger that is rooted in our past but is also borne in our enormous upheavals that have taken place in your brief lifetimes.”

Adding that “the politics of resentment and paranoia has unfortunately found a home in the Republican Party.”

Obama seemingly criticized Trump over his comments in 2017 in which he failed to condemn White supremacists following the deadly Unite the Right rally in Charlottesville that left one woman dead after she was hit by a car driven by a self-identified neo-Nazi.

“It shouldn’t be Democratic or Republican to say that we don’t target groups of people because of what they look like or how they pray. … We are supposed to stand up to discrimination and we are sure as heck to stand up clearly and unequivocally to Nazi sympathizers,” he said. “How hard can that be, saying that Nazis are bad?”

At a rally in North Dakota on Friday, Trump acknowledged Obama’s comments telling the crowd that it put him to sleep, according to CNN.

“I watched it, but I fell asleep. I’ve found he’s very good for sleeping,” said the president.

Trump and Obama’s relationship has always been contentious. In 2011, Trump spread false claims that Obama, the nation’s first Black president, was not born in the U.S.

He’s also attacked him on Twitter and has undone a number of Obama-era policies in the almost two years he’s been in office.

Obama also took the time to urge students to go out and vote, adding that the last two years should be viewed as a reminder to people who think their votes aren’t important.

“Don’t tell me your vote doesn’t matter,” he said, referring to voting as the “antidote” to all that ails Washington. “And if you thought elections don’t matter, I hope these last two years have corrected the impression.”