A battle between the White House and the press lands in federal court Thursday.

CNN filed a lawsuit against President Trump Tuesday, asking that the White House be ordered to restore the press pass held by its lead reporter on the beat, Jim Acosta. The case will be heard Thursday in U.S. District Court in Washington, D.C. by Judge Timothy J. Kelly, who was appointed by Trump to the bench.

The White House yanked Acosta's press pass following a testy exchange with the president at a press conference last Wednesday. Initially, press secretary Sarah Sanders, relying on a video that had been slowed down and zoomed in on, alleged that Acosta had "plac[ed] his hands" on a press aide who was trying to retrieve the microphone from Acosta at the press conference.

Later, the White House dropped that justification and said Acosta had "failed to treat the White House and the office of the presidency with respect."

CNN went to court seeking an immediate restoration of Acosta's press pass. It claimed that pulling the pass was a violation of the First Amendment guarantee of a free press, that it is essentially a way for the president to pick and choose who may cover the White House, and to punish journalists for publishing material critical of the president.

The CNN suit also relied on the constitution's guarantee to due process of law, and a federal law, the Administrative Procedures Act, which establishes rules for administrative actions, like this one.

In the past, there have been occasional flare-ups between the White House and the press corps over the qualifications of individual applicants for White House passes. In 1977, a lower court ruled against the Secret Service for pulling the pass of a reporter without establishing and following standards for doing that.

But the Acosta case appears to be unprecedented. Trump has repeatedly criticized CNN's coverage of the White House, characterizing it as "fake news," which he did again at the Nov. 7 press conference.

"I'll tell you what, CNN Should be ashamed of itself, having you work for them," Trump told Acosta during the publicly televised news conference. "You are a rude, terrible person" and when "you report fake news, which CNN does a lot, you are the enemy of the people."

Two days later, after Acosta's pass had been pulled, Trump also suggested that he might pull the press passes of "others too."

CNN's lawsuit is supported by a variety of other news organizations, including Fox News, the Reporters Committee for Freedom of the Press and the White House Correspondents Association, which issued a statement of strong support.

Justice Department lawyers, in court papers, defended the president's position. They contended the president has "the same broad discretion" to grant or pull passes from journalists assigned to cover the White House as it has to grant interviews to call on journalists at press conferences.

And they resurrected, by inference, that Acosta had acted improperly at the Nov. 7 press conference, contending that he "was disrupting press proceedings," as "is evident from the video he has proffered."

CNN has some 50 other employees who still have White House passes, the president's lawyers said. And "even if" CNN could show some First Amendment harm "in the abstract," Acosta is free to "practice his profession and report on the White House," without the access that a White House press pass provides.

Copyright 2018 NPR. To see more, visit http://www.npr.org/.