White House press secretary Sarah Huckabee Sanders said Sunday that President Donald Trump was just joking in 2016 when he said he loved WikiLeaks.

Trump had heaped praise on the anti-secrecy organization during his presidential campaign in 2016, after it released hacked emails from the Clinton campaign.

Yet he appeared to feign ignorance about the organization last week, saying he knew "nothing about WikiLeaks," following the revelation that its founder Julian Assange has been indicted in the US.

"Look, clearly the president was making a joke during the 2016 campaign," Sanders said.

Visit BusinessInsider.com for more stories.

White House press secretary Sarah Huckabee Sanders told Fox News' Chris Wallace on Sunday that President Donald Trump was just joking when he said in 2016 that he loved the controversial website WikiLeaks.

WikiLeaks is back in the spotlight after its founder, Julian Assange, was expelled from the Ecuadorean embassy in London, where he had been holed up for nearly seven years. Assange is facing extradition to the United States, where he is wanted on a computer hacking charge.

Trump had heaped praise on the anti-secrecy organization during his presidential campaign in 2016, after it released hacked emails from the Clinton campaign. At a number of campaign events, Trump declared, "I love WikiLeaks."

News organizations reported that Trump lauded WikiLeaks more than 140 times during his campaign. Yet he appeared to feign ignorance about the organization last week.

"I know nothing about WikiLeaks," Trump said April 11, when reporters asked for his reaction on Assange's arrest. "It's not my thing."

Read more: Trump dismisses questions about WikiLeaks after Julian Assange's arrest

Fox News' Chris Wallace asked Sanders on Sunday about the abrupt reversal, and whether Trump believed Assange was a villain or hero.

"Look, clearly the president was making a joke during the 2016 campaign. Certainly we take this serious. In fact, our administration's the only one that's done anything about it," she responded. "The president was making a joke during the campaign and talking about the specifics of the case at that moment."

Sanders went on to lambaste former President Barack Obama for commuting the sentence of Chelsea Manning, the whistleblower who leaked a trove of secret Pentagon documents to WikiLeaks in 2010.

"Let's not forget that the reason that the reason Julian Assange is being looked at is because of the engagement he had with Chelsea Manning," she said. "That individual is the person that the Obama administration actually commuted their sentence. We're the only ones that have taken this whole process seriously and are actually doing something to solve the problem."