A federal judge has ordered the White House to return the press credentials of CNN reporter and White House correspondent Jim Acosta.

The judge claimed that Acosta suffered "irreparable harm" from the revoke him from the White House.

U.S. District Court Judge Timothy Kelly announced his decision following a hearing. Kelly himself was appointed by the president. The judge stated that Acosta's credentials should be returned and reactivated "immediately."The White House did not give Acosta his due process.

The judge said the government could not say who initially decided to revoke Acosta's hard pass following CNN's lawsuit which alleged that Acosta's First and Fifth Amendment rights were violated by suspending his hard pass. 

"Let's go back to work!" Acosta said outside the courthouse after the ruling after first thanking his colleagues in the press and the judge for his decision.

A heavy blow for the White House who had indicated that they were considering revoking the credentials of several other journalists. They were even mulling over the option of giving no press access to the White House.

The ruling is being touted as a precedent-setting case for journalistic access to the White House. This is a temporary restraining order and the administration could appeal the decision.