Defense Secretary Jim Mattis expressed solidarity with President Trump’s stripping of former Obama CIA Director John Brennan’s security clearance earlier this week.

“All I can tell you is, I have taken security clearances away from people in my previous time in uniform, and a security clearance is something that is granted on an as-needed basis,” he told Pentagon reporters traveling with him in South America on Friday.

The comment came in response to a question on what he thought about former intelligence officials denouncing the president for stripping Brennan’s security clearance.

Earlier this week, retired Navy Adm. Bill McRaven published a letter criticizing the president for stripping Brennan’s security clearance and asking him to take away his as well.

Trump critics hoped that the op-ed by McRaven, the Navy SEAL commander who oversaw the raid to get Osama Bin Laden during the Obama administration, would prompt other national security figures to denounce the president.

Shortly after McRaven’s letter, former intelligence officials spoke out against the stripping Brennan of his security clearance, many if not all of whom were already critics of Trump.

McRaven was nominated as the head of U.S. Special Operations Command by President Obama, and Hillary Clinton had reportedly considered him as a running mate. He spoke glowingly of Clinton in 2014, when he introduced her at an event.

White House Press Secretary Sarah Sanders announced Wednesday that the president revoked Brennan’s security clearance due to Brennan’s continued attacks of the president and assertions he colluded with Russia on Twitter and on MSNBC, where he is now a national security analyst.

Sanders said, reading a statement from Trump:

Historically, former heads of intelligence and law enforcement agencies have been allowed to retain access to classified information after their government service so that they can consult with their successors regarding matters about which they may have special insights and as a professional courtesy. Neither of these justifications supports Mr. Brennan‘s continued access to classified information. Additionally, Mr. Brennan has recently leveraged his status as a former high-ranking official with access to highly sensitive information to make a series of unfounded and outrageous allegations — wild outbursts on the Internet and television — about this administration. Mr. Brennan‘s lying and recent conduct, characterized by increasingly frenzied commentary, is wholly inconsistent with access to the nation’s most closely held secrets, and facilitates the very aim of our adversaries, which is to sow division and chaos.

“More broadly, the issue of Mr. Brennan‘s security clearance raises larger questions about the practice of former officials maintaining access to our nation’s most sensitive secrets long after their time in government has ended,” Sanders added.

“Such access is particularly inappropriate when former officials have transitioned into highly partisan positions and seek to use real or perceived access to sensitive information to validate their political attacks. Any access granted to our nation’s secrets should be in furtherance of national, not personal, interests.”

Trump is also evaluating pulling the security clearances of former Director of National Intelligence James Clapper, former FBI Director James Comey, former CIA Director Michael Hayden, former Deputy Attorney General Sally Yates, former National Security Adviser Susan Rice, former Deputy FBI Director Andrew McCabe, former FBI counterintelligence official Peter Strzok, former FBI lawyer Lisa Page, and current Justice Department official Bruce Ohr.