CIA Director Mike Pompeo's condemnation of the anti-secrecy group WikiLeaks stands in stark contrast to the praise President Donald Trump has heaped on the group in the past.

Pompeo used his first public speech as head of the top spy agency in the U.S. to label WikiLeaks as a "hostile intelligence service" and a threat to national security.

When Trump was running for president, he said he was happy to see WikiLeaks publish hacked emails that proved politically damaging to his opponent, Hillary Clinton.

In defending the president, White House officials say there is a big difference between WikiLeaks publishing stolen personal emails of a political figure and publishing files about national security tools used by the CIA.