In his ruling, U.S. District Court Judge Timothy J. Kelly emphasized that the Fifth Amendment and a White House denial of Acosta's due process spurred the decision. The ruling temporarily reinstates Acosta's credentials to enter the White House.
"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," press secretary Sarah Sanders said in a statement. "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."
Acosta, who's challenged Trump on policy and asked provocative questions during news conferences, scolded the president last week for referring to a caravan of Central American migrants approaching the United States as an "invasion."
CNN sued the White House on First Amendment grounds and an emergency motion for immediate reinstatement.
Justice Department attorneys argued that revoking the pass was "lawful" and the White House has "broad discretion to regulate" journalists.

"If, at some point, after restoring the hard pass the government would like to move to vacate the restraining order on the grounds that it has fulfilled its due process obligations then it may, of course, do so," Kelly wrote in Friday's ruling.
CNN tweeted Friday it looked forward to a "full resolution" of the issue.