A federal judge on Tuesday blocked the Trump administration's attempt to bar reporters from CNN, MS NOW and Politico from the White House, granting a preliminary injunction that keeps the outlets' journalists' access in place while the case proceeds.

U.S. District Judge Timothy Kelly, himself a Trump appointee, wrote in a 26-page decision that revoking the reporters' hard passes likely violated their First Amendment and Fifth Amendment rights, and that such a move would deter a reasonable news organization from publishing coverage the president dislikes.

The three outlets sued on September 21, arguing the ban was retaliation for their reporting and that their journalists were denied due process. The president had publicly anticipated losing in court and said the Justice Department would appeal.

The injunction is not the final word: the case continues, and an appeal is expected. For now, the ruling preserves the long-standing arrangement under which credentialed reporters from critical outlets keep working from the White House grounds.