CNN filed a lawsuit against President Donald Trump and several of his aides on Tuesday in an attempt to restore the credentials of the news agency’s chief White House correspondent, Jim Acosta.

The suit, which was filed in U.S. District Court in Washington, D.C., alleges that the White House’s decision to revoke Acosta’s access to the White House violated the First and Fifth Amendment.

“This is not a step we have taken lightly. But the White House action is unprecedented,” said Jeff Zucker, the president of CNN Worldwide in an internal memo to staff.

The suit names six defendants including the president, as well as chief of staff John Kelly, press secretary Sarah Huckabee-Sanders, Secret Service director Randolph Alles, and two others, all named for their roles in enforcing or announcing the revocation.

The press secretary claimed that the suit is an example of CNN “grandstanding,” and that President Trump and the administration would “vigorously defend” themselves.

SLIDESHOW: DONALD TRUMP’S 30 CRAZIEST TWEETS

Sanders initially claimed on Wednesday that Acosta had his pass revoked for “placing his hands” on a White House intern who was attempting to take a microphone away from him.

Yet President Trump cast doubt on that explanation on Friday by saying that while Acosta was “not nice to that young woman,” he did not hold that against him “because it wasn’t overly, you know, horrible.”

After facing backlash for her initial claims and for posting a distorted video of the event in question, Sanders changed her explanation for the decision, claiming Acosta acted disrespectfully and unprofessionally during the event.

Lawyers for CNN defended the media organization, saying, “We wanted to just report the news. Mr. Acosta wants to report the news. CNN wants to report the news.”

CNN’s suit cites the federal regulation governing media access to the president that states that “officials of the Secret Service will be guided solely by the principle of whether the applicant presents a potential source of physical danger to the President and/or the family of the President so serious as to justify his or her exclusion from White House press privileges.”

For its part, CNN argues that if the decision is not overturned, it would set a dangerous precedent, and claims that “the revocation of Acosta’s credentials is only the beginning.”

“While the suit is specific to CNN and Acosta, this could have happened to anyone,” the network said. “If left unchallenged, the actions of the White House would create a dangerous chilling effect for any journalist who covers our elected officials.”