A US judge on Friday temporarily restored White House press credentials to CNN correspondent Jim Acosta, which were revoked following a contentious press conference with President Donald Trump, saying there should be a due process in place for limiting a journalist's access to the White House.

US District Judge Timothy Kelly, who is hearing CNN's lawsuit challenging to the revocation, ordered the White House to restore Acosta's press pass while the case is pending.

"Let's go back to work," Acosta said to reporters after the hearing.

CNN said in a statement it "looked forward to a full resolution in the coming days" and thanked "all who have supported not just CNN, but a free, strong and independent American press".

Kelly did not address the First Amendment's protections for freedom of speech and the press, but instead focused on due process provisions of the Constitution that provide for fair treatment through a judicial process.

The White House revoked Acosta's credentials last week in an escalation of the Republican president's attacks on the news media, which he has dubbed the "enemy of the people."

In court, US government lawyers said there is no First Amendment right of access to the White House and that Acosta was penalised for acting rudely at the conference and not for his criticism of the president.

The judge said White House press secretary Sarah Huckabee Sanders' initial statement that Acosta was penalised for touching a White House staffer attempting to remove his microphone was "likely untrue and at least partly based on evidence that was of questionable accuracy".

Sanders accused Acosta of "placing his hands on a young woman just trying to do her job as a White House intern" and of preventing other reporters from asking questions at the news conference. She called his behaviour "absolutely unacceptable" and said his White House press pass would be suspended "until further notice".

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.