President Trump on Wednesday yanked the security clearance of ex-CIA chief John Brennan — one of the president’s loudest critics — and threatened to take it away from other former officials who’ve publicly disparaged him.

In a statement read by administration spokeswoman Sarah Huckabee Sanders at the White House, the president accused Brennan of abusing his access to classified information by using it to “sow division and chaos.”

“I’ve decided to revoke the security clearance of John Brennan, former director of the Central Intelligence Agency,” the statement said.

The commander-in-chief accused Brennan — a 25-year veteran of the agency — of “erratic conduct and behavior,” “frenzied commentary” and “wild outbursts on the Internet and television” in his statement, which the White House then sent to reporters in two versions.

The first indicated that the statement was written on July 26; the second omitted the date.

Brennan later returned fire on Twitter.

“This action is part of a broader effort by Mr. Trump to suppress freedom of speech & punish critics. It should gravely worry all Americans, including intelligence professionals, about the cost of speaking out. My principles are worth far more than clearances. I will not relent,” he said.

Brennan had slammed Trump on Twitter the day before for calling Omarosa Manigault Newman a “ dog.”

“It’s astounding how often you fail to live up to minimum standards of decency, civility, & probity. Seems like you will never understand what it means to be president, nor what it takes to be a good, decent, & honest person. So disheartening, so dangerous for our Nation,” Brennan wrote.

Trump said he was also reviewing the security clearances of several other former top government officials, all of whom have criticized him, including ex-national intelligence director James Clapper, former top G-man James Comey, ex-Obama national security adviser Susan Rice, former National Security Agency director Michael Hayden and former deputy Attorney General Sally Yates, among others.

Huckabee Sanders denied that the moves were motivated by politics or the individuals’ criticism of the president.

Former top national security officials have historically maintained their security clearances so they can consult with their successors.

But Trump said Brennan did not deserve to keep his clearance because of his actions.