A volunteer shouts numbers on the list for Migrants waiting to apply for asylum in the United States outside the El Chaparral border in Tijuana, Mexico July 24, 2019. REUTERS/Carlos Jasso

SAN FRANCISCO (Reuters) - A U.S. judge in San Francisco on Wednesday stopped the Trump administration from enforcing a new rule that would bar almost all asylum applications at the U.S.-Mexico border.

Judge Jon Tigar in the U.S. District Court for the Northern District of California issued a preliminary injunction blocking the rule, enacted on July 16, that would require asylum-seekers to first pursue safe haven in a third country through which they had traveled on their way to the United States.

A different U.S. judge had allowed the new rule to go forward earlier on Wednesday in a separate lawsuit in Washington.

The ruling by Tigar, who was appointed by former President Barack Obama, renders inconsequential the decision by the Washington-based judge, Timothy Kelly, appointed by President Donald Trump.

The rule will now be suspended pending further proceedings.