A federal appeals court said Friday that President Trump can begin blocking some Central American migrants from applying for asylum in the United States, but only along parts of the border with Mexico.

Migrants who seek asylum in New Mexico and Texas can be subjected to the administration’s new rules, which effectively prohibit them from requesting protection if they traveled through another country on their way to the United States unless they already tried and failed to receive asylum in that other country or countries, the court said.

But the ruling by the three-judge panel for the United States Court of Appeals for the Ninth Circuit, in San Francisco, is only a partial victory for Mr. Trump, whose immigration agenda has repeatedly been delayed by judges.

In July, a lower court had blocked the president’s new asylum rules after finding that the administration had probably violated the procedures required to put those regulations in place. The judge suspended the asylum rules nationwide while the court challenge continued.