A federal judge has temporarily blocked the Trump administration from barring three news organizations from the White House complex while their lawsuit over access continues.

U.S. District Judge Timothy Kelly issued the preliminary injunction late Tuesday. The administration cited national security in part; the organizations argued that the ban discriminated against their viewpoints. Kelly noted that Trump raised the security rationale after their press passes had been revoked and found that the restrictions likely violated reporters’ speech and due process rights.

The order keeps the organizations’ access to the complex in place until the lawsuit is resolved. It does not require access to the Oval Office or Air Force One. Kelly had earlier lifted the ban temporarily, and Trump said before the latest ruling that he would appeal.