A federal judge in Washington, D.C., has restored The Associated Press’s access to the White House press pool, ruling that the administration’s ban on the news service over its refusal to use the term Gulf of America likely violated the First Amendment.

“[U]nder the First Amendment, if the Government opens its doors to some journalists — be it to the Oval Office, the East Room, or elsewhere — it cannot then shut those doors to other journalists because of their viewpoints,” U.S. District Judge Trevor N. McFadden wrote in his 41-page order. “The Constitution requires no less.”

Bruce D. Brown, president of the Reporters Committee for Freedom of the Press, issued the following statement in response to the order:

“The judge’s order recognizes that the White House can’t pick and choose who gets to cover it and how. This is a big win for AP, and it’s also an important victory for the public here and abroad who rely on its reporting.”

In February, the Reporters Committee, joined by more than 30 news media organizations, wrote a letter to the White House urging it to restore the AP’s access. And after the AP sued over the ban, the Reporters Committee filed a friend-of-the-court brief in support of the news service’s request for a preliminary injunction, arguing that excluding its journalists from certain White House events solely due to its editorial viewpoint was unconstitutional.