The U.S. Supreme Court set aside a Bay Area federal judge’s order Wednesday and allowed the Trump administration to resume denying asylum to virtually all Central Americans who try to enter the United States at the Mexican border.

In a 7-2 decision, the court granted the administration’s request to suspend U.S. District Judge Jon Tigar’s injunction while the case proceeds. The brief order did not state reasons for the decision. Justices Sonia Sotomayor and Ruth Bader Ginsburg dissented.

At issue is the fate of thousands of migrants from the violence-wracked nations of Honduras, El Salvador and Guatemala. The administration’s policy, which took effect July 16, made them ineligible for U.S. asylum because they passed through another country, Mexico, without seeking refuge there. Only victims of human trafficking are still allowed to apply for asylum.

Tigar issued an injunction against the new restrictions on July 24, saying U.S. immigration law allows migrants fleeing persecution in their homeland to apply for asylum regardless of the route they traveled. The Ninth U.S. Circuit Court of Appeals, in an Aug. 16 ruling, refused to lift his injunction but narrowed it to the boundaries of the Ninth Circuit, which include California and Arizona but not Texas and New Mexico.

The court then returned the case to Tigar to consider additional evidence, and Monday he reinstated a nationwide injunction. He said immigration law needs to be uniform nationwide, and also that varying standards would harm the immigrant-support organizations that challenged the administration policy, because they represent migrants throughout the country.

On Tuesday night, the court granted the administration’s request for a stay that again narrowed the injunction to the boundaries of the Ninth Circuit. The court asked for written arguments through Sept. 19 on whether to extend the stay while it reviews the case, and scheduled a hearing for the first week in December.

The Supreme Court stepped in Wednesday afternoon and blocked Tigar’s entire injunction, allowing the administration to enforce its policy nationwide. The court said its order would remain in effect while the Ninth Circuit considered and ruled on the case, and would be lifted only if the high court denied review of the appeals court’s derision. That process will not be completed until sometime next year.

In dissent, Sotomayor, joined by Ginsburg, said, “Once again the executive branch has issued a rule that seeks to upend longstanding practices regarding refugees who seek shelter from persecution.” The new policy she said, “affects some of the most vulnerable people in the Western Hemisphere.”

Asylum is available to migrants who can show a “well-founded fear of persecution” in their homeland because of race, religion, nationality or sexual orientation. Those who obtain it can live and work in the U.S. and eventually apply for citizenship.

Lee Gelernt, the American Civil Liberties Union attorney representing immigrant-advocacy groups that challenged the administration’s policy, tried to put an optimistic spin on the court’s action.

“This is just a temporary step, and we’re hopeful we’ll prevail at the end of the day,” Gelernt said. “The lives of thousands of families are at stake.”

The court’s order “will result in people being deported to their deaths,” said Blaine Bookey, co-director of the Center for Gender and Refugee Studies at UC Hastings College of the law in San Francisco.

Justice Department spokesman Alexei Woltornist said the order “will assist the administration in its objectives to bring order to the crisis at the southern border, close loopholes in our immigration system, and discourage frivolous claims.”

Bob Egelko is a San Francisco Chronicle staff writer. Email: begelko@sfchronicle.com Twitter: @BobEgelko