WASHINGTON — CIA Director Mike Pompeo has denounced the anti-secrecy group WikiLeaks as a “hostile intelligence service” and a threat to US national security, a condemnation that differed sharply from President Donald Trump’s past praise of the organization.

In his first public speech since taking over the CIA, the former Republican congressman escalated the agency’s hostility to WikiLeaks and its founder, Julian Assange, accusing them of making common cause with dictators. While “Assange and his ilk” claim they act in the name of liberty and privacy, Pompeo said that in reality, their mission is “personal self-aggrandizement through the destruction of Western values.”

“WikiLeaks walks like a hostile intelligence service and talks like a hostile intelligence service,” Pompeo said Thursday.

Pompeo’s tone was notably different from that of his boss.

Before last year’s presidential election, Trump said he was happy to see WikiLeaks publish private, politically damaging emails from Hillary Clinton’s campaign manager, John Podesta. The White House defended the president, saying there was a big difference between WikiLeaks publishing stolen personal emails of a political figure and publishing files about national security tools used by the CIA.

WikiLeaks last month released nearly 8,000 documents that it says reveal secrets about the CIA’s cyberespionage tools for breaking into targeted computers, cellphones and even smart TVs. It previously published 250,000 State Department cables and embarrassed the US military with hundreds of thousands of logs from Iraq and Afghanistan.

Pompeo said there was no “quick fix” for solving the threat posed by Assange and others determined to publicize US secrets.

The US and the CIA can shame Assange publicly and fortify information systems, he said. They can build trust with the public, however hard that may be for an agency defined by its secrecy.

Pompeo also suggested denying “Assange and his colleagues the latitude to use free speech values against us.” He did not say how that could be done, but said Assange is not protected by the US Constitution because he’s not an American.

Pompeo noted that in January, US intelligence officials determined Russian military intelligence had used WikiLeaks to release data obtained through cyber operations against the Democratic National Committee. He said American intelligence also found that Russian state-owned television network RT actively collaborated with WikiLeaks.

He also criticized Edward Snowden, the former National Security Agency contractor who leaked documents revealing widespread US government surveillance programs. Snowden currently lives in Russia. Assange, an Australian, has resided the last four years in Ecuador’s embassy in London. He received political asylum after skipping bail to avoid extradition to Sweden, where he is wanted over a rape allegation.

“While we do our best to quietly collect information on those who possess very real threats to our country, individuals like Julian Assange and Edward Snowden seek to use that information to make a name for themselves,” Pompeo said at the Center for Strategic and International Studies, a Washington think tank. “As long as they make a splash, they care nothing about the lives they put at risk or the damage they cause to national security.”

In an opinion piece published Wednesday in the Washington Post, Assange defended his disclosures, which he depicted as “truths regarding overreaches and abuses conducted in secret by the powerful.”

“Our most recent disclosures describe the CIA’s multibillion-dollar cyberwarfare program in which the agency created dangerous cyber weapons, targeted private companies’ consumer products and then lost control of its cyber arsenal,” Assange wrote.

Pompeo did not confirm the cyberespionage tools released by WikiLeaks belonged to the agency. Since the disclosure, the US government has all but publicly accepted the embarrassing claim. Trump said in an interview: “I just want people to know the CIA was hacked, and a lot of things taken.”

On Monday, a California-based computer security company said the tools disclosed by WikiLeaks have been linked to 40 spying operations in 16 countries. Symantec Corp. linked them to electronic infiltration of international, financial, energy and aerospace organizations across the world.