New York (CNN Business) A federal judge ruled against the White House on Tuesday and ordered President Trump and press secretary Stephanie Grisham to immediately restore the press credentials of Brian Karem, a Playboy columnist and CNN political analyst.

"Karem has shown that even the temporary suspension of his pass inflicts irreparable harm on his First Amendment rights," US District Court Judge Rudolph Contreras wrote in his opinion.

Reacting to the decision, Karem told CNN, "It's good for me, but it's great for the free press. Today was about all of us."

Karem's attorney, Ted Boutrous, added in a statement to CNN that he was "very pleased" with the court's decision.

"The White House's suspension of his press credentials violated the First Amendment and due process and was a blatant attempt to chill vigorous reporting about the President," Boutrous said.

Read More