A U.S. judge on Tuesday ordered President Donald Trump’s White House to lift access restrictions imposed on the Associated Press over the news agency’s decision to continue to refer to the Gulf of Mexico in its coverage.

U.S. District Judge Trevor McFadden, who was appointed by Trump during his first term, ruled the White House must allow AP journalists access to the Oval Office, Air Force One and events held at the White House while the AP’s lawsuit moves forward.

The White House began limiting AP’s access to several events that featured Trump after the news agency said it would continue using the name Gulf of Mexico while acknowledging Trump’s order to change the name of the body of water to the Gulf of America.