CNN filed a lawsuit against the Trump administration on Tuesday, alleging a First Amendment violation and demanding that journalist Jim Acosta’s White House credentials be restored.

The lawsuit comes in the aftermath of a heated news conference held by President Trump on Wednesday, after the midterms.

After several questions about Trump’s inflammatory rhetoric regarding a caravan of Central American migrants, the president lashed out at Acosta, calling the CNN reporter “a rude, terrible person.”

“You shouldn’t be working for CNN,” he snapped.

Hours later, the hostility between the administration and CNN’s star White House correspondent reached new heights, when Acosta announced that his press pass had been suspended.

White House press secretary Sarah Sanders initially attributed the revocation to Acosta’s interaction with a White House intern at the news conference, saying that he’d placed his hands on the intern, who was trying to take the microphone away from Acosta during his back-and-forth with the president.

In a statement after CNN sued, however, Sanders shifted and blamed the reporter’s alleged rowdy behavior and “attempts to monopolize the floor.”

CNN’s lawsuit — filed in U.S. District Court in Washington — names CNN and Acosta as plaintiffs. Trump, Chief of Staff John F. Kelly, Deputy Chief of Staff for Communications Bill Shine, Sanders, and the U.S. Secret Service are named as defendants. The lawsuit alleges a violation of the First Amendment; a violation of the Fifth Amendment, which guarantees due process in government actions; and a violation of the Administrative Procedure Act.

It asks for the immediate restoration of Acosta’s credential, or restoration pending a hearing before a “neutral” arbiter.

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

But is this really a press freedom issue? Or is it just a dispute between a White House executive and a specific news organization?

What is the law?

The First Amendment guarantees freedom of the press, meaning the government is barred from discriminating against viewpoint.

Under no circumstance can the White House revoke a reporter’s access to open press briefings simply because it doesn’t like that reporter’s questions. However, the First Amendment does not guarantee all reporters the right to attend White House briefings. Whether the White House is justified in blocking a reporter’s access is a determination made by a judge.

First Amendment lawyer Floyd Abrams told The Washington Post that the Constitution doesn’t allow content discrimination against journalists who publish things that a political figure disagrees with, or against reporters who ask difficult and probing questions of that official. That conduct is protected.

“It cannot happen because of disagreement with a journalist about the content of his or her reporting. It cannot happen in an effort to retaliate because of prior reporting,” Abrams said Tuesday.

There are situations where a journalist’s access to a news conference can be effectively stripped, though they are rare, Abrams said. For example, if a journalist is an ongoing threat to people present in the area, the government has a legitimate argument to take away his or her access.

Courts have never before seen a presidential administration bar a journalist for nonthreatening, but disruptive, behavior — as Sanders has alleged. But they could.

In this case, the court will come back to whether Acosta is being discriminated against because of the content of his speech or the quality of his behavior.

What will CNN argue?

The media will occasionally bring First Amendment violation cases, typically when the lone reporter representing an outlet or the entire news organization itself is blocked.

That’s not true here: CNN still has multiple reporters covering the White House. But Jameel Jaffer, director of the Knight First Amendment Institute at Columbia University, called the lawsuit “entirely justified” and said CNN appears to have a strong case.

“It’s pretty clear from the factual record that the White House revoked Acosta’s access because of the content of his questions. At the end of the day, that’s enough to establish a First Amendment violation,” Jaffer said.

Despite the press secretary’s original claim that Acosta placed his hands on an intern, several experts argued that the undoctored video evinced no excessive contact between the two. (Sanders, in supporting her claim, tweeted an apparently doctored video of the incident.)

The intern “bumped into [Acosta] reaching for the microphone,” Freedom Forum Institute President Gene Policinski said.

Still, that contact probably provided the White House with bit of a rationale.

Policinski said that deliberate and repeated disruption could amount to a reasonable basis to block a reporter from attendance. But, he said, Acosta’s questions were asked in a responsible way.

“Journalists attend press briefings to ask tough questions. Sometimes you’ll ask a question that some people find repellent, but that comes with the territory. Nothing in the First Amendment says journalists must be polite,” he said.

What will the White House argue?

The case comes down to an individual reporter and his right to be there, according to Stuart Karle, former general counsel for the Wall Street Journal and the former chief operating officer of Reuters News.

“If CNN was barred entirely, that would be problematic,” said Karle, now an adjunct professor at Columbia Journalism School.

The White House should be granting press access to news organizations with broad audiences, but no one reporter has an absolute right to attend, Karle said.

Presidential news conferences are events where reporters are expected to behave with a certain level of decorum. Failure to do so would be a reasonable basis to deny a press pass, Karle said. “Whether Acosta behaves badly — worse than anyone else — is a factual question. The White House just needs to articulate a legitimate reason,” he said.

The White House latched onto this notion, too, saying in a statement that CNN “has nearly 50 additional hard pass holders, and Mr. Acosta is 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. The First Amendment is not served when a single reporter, of more than 150 present, attempts to monopolize the floor."

The White House has broad authority about whom to call on and how many questions to take. Under other presidents, reporters have generally been limited to one question and possibly a related follow-up.

And CNN still has White House credentials. Other reporters can cover the president and his administration. (Just two days after the Acosta-Trump flare-up, the president insulted CNN’s Abby Phillip after she asked a question about acting attorney general Matthew G. Whitaker.)

Still, said Abrams, the First Amendment expert: “The White House may not choose the identity of the journalist that CNN sends to a press conference. That’s not a presidential prerogative.”

Paul Farhi contributed to this report.

Read more:

Foreign countries are increasingly using Trump as a foil — or a punchline

Florida recount: Here’s what you need to know.

GOP’s responses to the elections in Florida exacerbate concerns about voter suppression

A reader’s guide: 12 targets as House Democrats prepare to investigate the Trump administration