Former President Barack Obama hit the campaign trail this week and set his sights on President Donald Trump.

What did he say?

Speaking at a campaign rally for Virginia Democratic gubernatorial candidate Ralph Northam, Obama decried politicians who divide people to win campaigns.

"If you have to win a campaign by dividing people, you’re not going to be able to govern them. You won’t be able to unite them later if that's how you start," Obama said.

Obama says Trump shouldn't divide the country - only Obama was allowed to do that pic.twitter.com/3cC8QeTwAR #maga #hypocrite — Matt Batzel (@MattBatzel) October 21, 2017

The 44th president didn't refer to Trump by name, but he was clearly implying that his comments were about Trump and other Republicans. Obama made similar comments earlier in the day during a campaign event for Phil Murphy, a New Jersey Democrat who is campaigning to succeed Chris Christie.

A bit of irony: How did people react?

The comment was surprising coming from Obama because for the majority of his presidency he was known as the "divider-in-chief." The nickname was given to him because he liked to divide Americans into groups by race, political party, socioeconomic status and other demographics.

Surveys taken at the very end of Obama's presidency also found that America was much more divided after his eight years than they were before.

Ben Shapiro and other conservatives were quick to call Obama out: