This browser does not support the Video element.
WASHINGTON - (AP) -- A federal judge ordered the Trump administration on Friday to immediately return the White House press credentials of CNN reporter Jim Acosta, though a lawsuit over the credentials' revocation is continuing.
U.S. District Court Judge Timothy Kelly, an appointee of President Donald Trump, announced his decision at a hearing Friday morning. The judge said Acosta's credentials should be returned immediately and reactivated to allow him access to the White House complex for press briefings and other events.
The White House said it would comply, but planned to develop "rules" for orderly press conferences.
The White House revoked Acosta's credentials last week after he and Trump tangled during a press conference following the midterm elections. CNN sued and asked the judge to issue a temporary restraining order forcing the White House to give back Acosta's credentials at least temporarily. The judge agreed.
The suit by CNN alleges that Acosta's First and Fifth Amendment rights were violated when the White House revoked his credentials, called a "hard pass."
While the judge didn't rule on the underlying case, he ordered Acosta's credentials returned for now because he said CNN was likely to prevail on its Fifth Amendment claim -- that Acosta hadn't received sufficient notice or explanation before his credentials were revoked or been given sufficient opportunity to respond before they were.
The judge said the government could not say who initially decided to revoke Acosta's hard pass and how that decision was reached.
"In response to the court, we will temporarily reinstate the reporter's hard pass," White House press secretary Sarah Huckabee Sanders said in a statement. "We will also further develop rules and processes to ensure fair and orderly press conferences in the future."
The White House had spelled out its reasons for revoking Acosta's credentials in a tweet from Sanders and in a statement after CNN filed its lawsuit. But the judge said those "belated efforts were hardly sufficient to satisfy due process."
The judge also found that Acosta suffered "irreparable harm," dismissing the government's argument that CNN could simply send other reporters to cover the White House in Acosta's place.
But the judge also emphasized the "very limited nature" of his ruling Friday. He noted he had not determined that the First Amendment was violated.
The judge told attorneys to file additional court papers in the case by Monday.
On Friday afternoon, more than 50 members of the White House press corps greeted Acosta as he strode through the northwest gate of the presidential compound. He says he's grateful for the judge's ruling, that it was a test and he thinks the media passed the test.
"This is just any other day at the White House for me and I would like to get back to work," he said.
Trump has made his dislike of CNN clear since before he took office and continuing into his presidency. He has described the network as "fake news" both on Twitter and in public comments.
At last week's press conference, Trump was taking questions from reporters and called on Acosta, who asked about Trump's statements about a caravan of migrants making its way to the U.S.-Mexico border. After a terse exchange, Trump told Acosta, "That's enough," several times while calling on another reporter.
Acosta attempted to ask another question about special counsel Robert Mueller's Russia investigation and initially declined to give up a hand-held microphone to a White House intern. Trump responded to Acosta by saying he wasn't concerned about the investigation, calling it a "hoax," and then criticized Acosta, calling him a "rude, terrible person."
Hours later, the White House pulled Acosta's credentials.
The White House's explanations for why it seized Acosta's credentials have shifted over the last week.
Sanders initially explained the decision by accusing Acosta of making improper physical contact with the intern seeking to grab the microphone.
But that rationale disappeared after witnesses backed Acosta's account that he was just trying to keep the microphone, and Sanders distributed a doctored video that made it appear Acosta was more aggressive than he actually was.
On Tuesday, Sanders accused Acosta in a written statement of being unprofessional by trying to dominate the questioning at the news conference.