“CNN filed a lawsuit against the Trump Administration this morning in DC District Court,” the network said in a statement. “It demands the return of the White House credentials of CNN’s Chief White House correspondent, Jim Acosta. The wrongful revocation of these credentials violates CNN and Acosta’s First Amendment rights of freedom of the press, and their Fifth Amendment rights to due process.”

The network said it seeks an immediate restraining order returning the press pass to Acosta.

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

White House press secretary Sarah Huckabee Sanders accused the network of “more grandstanding” and called Acosta “no more or less special than any other media outlet or reporter with respect to the First Amendment.”

“The White House cannot run an orderly and fair press conference when a reporter acts this way, which is neither appropriate nor professional,” Sanders wrote in a statement to reporters. “The First Amendment is not served when a single reporter, of more than 150 present, attempts to monopolize the floor. If there is no check on this type of behavior it impedes the ability of the President, the White House staff, and members of the media to conduct business.”

Last week, Acosta, who has frequently clashed with Trump and Sanders, got into a heated exchange with Trump during a news conference. The president admonished him as “a rude, terrible person,” one of several attacks and insults he hurled at reporters during the same news conference.

Later that day, the White House press office revoked Acosta’s “hard pass,” which grants him entry to the White House grounds as a member of the White House press pool.

Jonathan Ernst/Reuters An intern moves to take the microphone from CNN's Jim Acosta during last week's press briefing. Later, the White House revoked Acosta's press pass.

To defend the decision, Sanders tweeted an apparently doctored video promoted by the right-wing conspiracy website Infowars, purporting to show Acosta physically assaulting the White House intern trying to take away the microphone he was using during the press conference.

Many journalism and press advocacy organizations defended Acosta and condemned the White House for its decision, one of a number of ways Trump and his administration have regularly fomented animosity against the press and attempted to infringe on press freedom.

In a statement Tuesday, the White House Correspondents’ Association said it “strongly supports” Acosta and CNN’s lawsuit.

“The president of the United States should not be in the business of arbitrarily picking the men and women who cover them,” WHCA President Olivier Knox said.

In a note to CNN employees, the network’s president, Jeff Zucker, wrote that the lawsuit “is not a step we have taken lightly. But the White House action is unprecedented.”

Later Tuesday morning, CNN’s lawsuit was assigned to U.S. District Court Judge Timothy J. Kelly in Washington, a Trump appointee and a former counsel to Senate Judiciary Committee Chairman Chuck Grassley (R-Iowa).

CNN’s lawyers in the case include Ted Olson, who represented George W. Bush in the 2000 election Florida recount, among other high-profile clients.

This story has been updated with a statement from the White House, as well as more background about and reactions to the lawsuit.