President Obama endorsed Hillary Clinton Thursday afternoon, saying “she’s got the courage, the compassion, and the heart to get the job done.” But that’s not what he was saying in 2008 when the two were competing for the Democratic nomination.

In a January 2008 debate, then-Senator Obama accused Clinton of being “willing to say anything to get elected.”

He repeated the charge in a radio ad that same month, in which he attacked Clinton as “what’s wrong with politics” and claimed she “will say anything to get elected.”

The ad began with Obama saying: “I’m Barack Obama, running for president and I approve this message,” before switching to a narrator.

“It’s what’s wrong with politics today,” the narrator said. “Hillary Clinton will say anything to get elected. Now she’s making false attacks on Barack Obama. The Washington Post says Clinton isn’t telling the truth.”

Attacking both Clintons’ dishonesty was a theme of the Obama campaign.

In an interview with ABC News, Obama said Bill Clinton “continues to make statements that are not supported by the facts … This has become a habit, and one of the things that we’re going to have to do is to directly confront Bill Clinton when he’s making statements that are not factually accurate.”

Obama repeatedly attacked Clinton throughout the primary as the second coming of George W. Bush.

In July 2007, he said Clinton was “Bush-Cheney lite.”

“If Hillary Clinton is the nominee, then we have a repetition of 2000 and 2004,” Obama said in an October 2007 interview with the New York Times.

Similarly, at December 2007 rally in Iowa, he slammed Hillary as being “just like Bush.”

Follow Peter Hasson on Twitter @PeterJHasson