This was also granted on a limited basis and was not on First Amendment ground, but the Fifth Amendment's right to due process. This came after the White House asked the Secret Service to take Acosta's press pass from him, barring him from attending White House press events.
Judge is explaining that the White House did not provide due process.
Mr Kelly has said the United States government could not say who initially made a decision to revoke Mr Acosta's hard pass.
White House press secretary Sarah Huckabee Sanders dismissed the legal action as "just more grandstanding from CNN", adding that "the White House can not run an orderly and fair press conference when the reporter acts [as Acosta did], which is neither appropriate nor professional".
The judge is a Trump appointee.
The White House pulled Acosta's credentials last week following a combative press conference in which he clashed with Trump. Kelly also says Acosta was not provided due process when the White House chose to revoke his hard pass.
"I will order defendants immediately restore Mr. Acosta's hard pass".
Ted Boutrous, an outside attorney representing CNN, said "This is a great day for the First Amendment and journalism". After all, the president has fueded with Acosta and CNN for a long time. Boutrous also said that Acosta's alleged rudeness isn't the issue here.
After Acosta's credentials were revoked many news outlets, including Fox News, backed CNN's lawsuit.
Burnham said that the White House is essentially President Trump's home and office and that he has some right to decide who can and can't be there.
In an interview published Wednesday in The Daily Caller, Trump called Acosta "bad for the country".
The White House's explanations for why it seized Acosta's credentials have shifted over the last week. "As a matter of law... yes", he said.
"Simply stated", the association's lawyers wrote in a brief on Thursday, "if the President were to have the absolute discretion to strip a correspondent of a hard pass, the chilling effect would be severe and the First Amendment protections afforded journalists to gather and report news on the activities on the President would be largely eviscerated".