A federal judge on Friday directed the White House to restore the press credentials of Jim Acosta of CNN, a win for media advocates and news organizations in a major legal test of press rights under President Trump.
The judge, Timothy J. Kelly of Federal District Court in Washington, ruled that the Trump administration had most likely violated Mr. Acosta’s due process rights when it revoked his press badge after a testy exchange with the president at a news conference last week.
The ruling was a significant but narrow victory for CNN. Judge Kelly, who was appointed by Mr. Trump, declined to weigh in on the First Amendment issues cited by the network, and the White House has the right to appeal. For now, Mr. Acosta can resume working on the White House grounds.
“I want to emphasize the very limited nature of this ruling,” the judge said from the bench. “I have not determined that the First Amendment was violated here.”
Judge Kelly’s decision came in response to CNN’s request for an emergency order restoring Mr. Acosta’s credentials. The lawsuit, which the network filed this week, remains active. Other legal issues raised in the case were expected to be addressed in later court sessions.
The White House press secretary, Sarah Huckabee Sanders, said in a statement after the ruling that the administration would temporarily reinstate Mr. Acosta’s pass and would “develop rules and processes to ensure fair and orderly press conferences in the future.”
“There must be decorum at the White House,” she wrote.
Ms. Sanders claimed in her statement that “the court made clear that there is no absolute First Amendment right to access the White House.” But Judge Kelly did not rule on the First Amendment issues raised by the case because he granted the temporary return of Mr. Acosta’s pass on due process grounds.
Mr. Acosta, CNN’s chief White House correspondent, rose to prominence in large part because of his public jousts with Mr. Trump. The conflict between the reporter and the White House had grown into a legal showdown over journalists’ ability to cover a president who regularly denigrates their work as “fake news.”
Friday’s ruling was hailed by free speech advocates as a victory for journalism.
“Today’s decision reaffirms that no one, not even the president, is above the law,” the American Civil Liberties Union said in a statement. CNN said the network was “gratified with this result, and we look forward to a full resolution in the coming days.”
CNN had argued that the White House had violated Mr. Acosta’s free speech and due process rights, citing a case from the 1970s that required the White House to demonstrate a clear process, and right of appeal, before revoking a reporter’s credentials. Judge Kelly said the Trump administration had been unable to articulate the process that led to stripping Mr. Acosta of his press pass.
The administration contended that presidents enjoy broad discretion to bar journalists from the White House, and that Mr. Acosta’s barbed questioning and refusal to yield his microphone at the contentious conference in the East Room on Nov. 7 was boorish and disrespectful.
Mr. Acosta, who attended the hearing and showed no emotion when the ruling was announced, thanked the judge afterward.
“Let’s go back to work,” he told reporters outside the courthouse.
The case, CNN v. Donald J. Trump, had come to symbolize the dysfunctional dynamic between Mr. Trump and the White House press corps.
It also revealed that much of the interaction between presidents and the press is based on custom, rather than any kind of legal framework. Reporters have had access to the White House for decades, but the mechanics of the tradition have rarely been enshrined in law.
“The relationship between the White House and the beginnings of the press corps came about as a matter of mutual convenience, not as a matter of legal grounding,” said Stephen Ponder, a media historian who has written on reporters in the White House.
No president relishes being scrutinized by the news media, and administrations have long relied on subtle and not-so-subtle methods to ice out reporters they considered troublesome by, for instance, ignoring their questions at briefings or giving scoops to their competitors.
Advocacy groups said that stripping a correspondent’s credentials entered the realm of retaliation, and posed a threat to basic press freedoms.
For Mr. Trump and his supporters, penalizing Mr. Acosta was a surefire crowd-pleaser. The president’s political team released a fund-raising email touting CNN’s lawsuit as evidence that the news media was intent on hurting the administration. White House allies like Sean Hannity of Fox News have denounced Mr. Acosta as a biased grandstander.
Other presidents have expressed animus toward reporters in memorable ways. In 1942, Franklin D. Roosevelt handed out a Nazi Iron Cross at a news conference and asked that it be bestowed on one of his least loved chroniclers, a columnist at The Daily News of New York.