John Brennan
John BrennanReuters

Former CIA Director John Brennan fired back on Wednesday, after President Donald Trump revoked his security clearance.

“This action is part of a broader effort by Mr. Trump to suppress freedom of speech and 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,” Brennan wrote on Twitter.

White House press secretary Sarah Huckabee Sanders said earlier on Wednesday that Brennan's clearance was revoked because of his "erratic conduct and behavior" and "history that calls into question his objectivity and credibility."

In July it was reported that Trump was considering pulling the national security clearances of top-level former intelligence officials for making what the White House described as "baseless accusations" against him.

In addition to Brennan, those former officials reportedly included former FBI Director James Comey, former NSA Director Michael Hayden, former U.S. national security advisor Susan Rice and former FBI Deputy Director Andrew McCabe.

All of those federal officials served during the Obama administration, and all have been vocally critical of Trump since leaving their posts in government.