(CN) - A federal judge has ruled that the Trump administration wrongly denied CNN's Jim Acosta due process in revoking his White House press pass and must give it back.
U.S. District Court Judge Timothy Kelly, an appointee of President Donald Trump, said the president need never call on Acosta again during a press briefing, but the way the administration handled its displeasure with the reporter was clearly wrong and needlessly “shrouded in mystery.”
As a result, he said, he would grant CNN's request for a temporary restraining order to restore Acosta's access.
In a statement released after the ruling, the White House said, “Today, the court made clear that there is no absolute First Amendment right to access the White House.
"In response to the court, we will temporarily reinstate the reporter’s hard pass. We will also further develop rules and processes to ensure fair and orderly press conferences in the future.
There must be decorum at the White House,” the administration said.
In his ruling, Kelly was highly critical of assertions by White House spokeswoman Sarah Huckabee Sanders that Acosta laid hands on the intern who tried to remove a microphone from his grasp, calling the story "likely untrue."
Speaking before a crowded courtroom, Judge Kelly also described Sanders’ implication as one of “questionable accuracy.”
The government also failed to present information which would clarify what process was undertaken to remove Acosta’s credentials, he said. The White House’s reasons for the suspension were submitted after it had already gone through.
“Those belated efforts were hardly sufficient to satisfy due process,” the judge said.
The judge also brushed off arguments by government attorney James Burnham earlier this week said CNN would not be harmed so long as another reporter from the organization has access to the White House.
Though the government must allow Acosta due process in the course of challenging the suspension of his press pass when it comes to claims of First Amendment violations, that works slightly differently.
Acosta’s First Amendment rights supersede the White House’s right to have “orderly” conferences, the judge noted.
Though he agreed with the White House that the First Amendment does not guarantee access to White House grounds, there’s an exception to consider: since the White House allows one reporter inside yet denies another, then First Amendment comes back into play.
The White House revoked Acosta's hard pass after a contentious post-midterm press conference on Nov. 7. Sanders initially claimed that it was because he put his hands on a female aide as she tried to grab a microphone from him. Acosta denied that, and video of the incident confirmed his account.
The administration then claimed it pulled his pass because he refused to yield the floor to another reporter.
On Friday, Judge Kelly said CNN has demonstrated a likelihood it will prevail in showing Acosta was denied due process in credential revocation.
In a statement following the ruling CNN said: “We are gratified with this result and we look forward to a full resolution in the coming days. Our sincere thanks to all who have supported not just CNN but a free strong and independent American press.”
As Acosta exited the courthouse, he thanked his colleagues in the press "who supported us this week and the judge for the decision he made today" before adding, "Let’s get back to work.”
Ben Wizner, director of speech, privacy and technology at the American Civil Liberties Union celebrated the initial victory for CNN and for a free press.
“Today’s decision reaffirms that no one, not even the president, is above the law. The White House surely hoped that expelling a reporter would deter forceful questioning, but the court’s ruling will have the opposite effect. The freedom of the press is a bedrock principle, and our democracy is strengthened when journalists challenge our leaders rather than defer to them,” Wizner said.
But Trump was unbowed when he discussed the ruling with reporters Friday afternoon.
"People have to behave," the president said before revealing that the White House is "writing up rules and regulations" for how reporters will be expected to act going forward.
Asked when he meant by "rules and regulations," Trump said, "Decorum."
"You can't take three questions and four questions," he said. "You can't stand up and not sit down."
"We want total freedom of the press. It's more important to me than anybody would believe," Trump continued. "But you have to act with respect when you're at the White House, and when I see the way some of my people get treated at news conferences, it's terrible.
"So we're setting up a certain standard, which is what the court is requesting," the president said. "With the rules and regulations, we will end up back in court and we will win."
Read the Top 8
Sign up for the Top 8, a roundup of the day's top stories delivered directly to your inbox Monday through Friday.