The opinion, from the United States Court of Appeals for the Ninth Circuit, extends constitutional habeas corpus guarantees to those applying for asylum at the border and provides that they can seek a hearing in the federal courts before being summarily deported — though the court did not specify what standards the courts must use to evaluate such petitions.

The ruling applies to asylum seekers in the nine western states included in the court’s jurisdiction and, because it conflicts with an earlier ruling rejecting such legal protections in the Third Circuit, the issue is likely to be resolved ultimately by the Supreme Court. In the meantime, legal analysts said, the court’s decision is likely to have sweeping implications for immigration deterrence efforts by enabling thousands to remain in the country while they seek the court review.

Under current procedure, every migrant who arrives at the border and expresses a fear of persecution in his or her homeland is referred for an interview with an asylum officer. Those who succeed in convincing the officer that they have a credible fear are allowed to enter the country and proceed with their asylum cases in the immigration courts. Those who don’t can request a review by an immigration judge, but it is usually cursory and favorable decisions are rare. There is usually no access to a lawyer, and no opportunity to challenge the decision; deportation quickly ensues.

In the case before the appeals court, Vijayakumar Thuraissigiam, a member of Sri Lanka’s Tamil ethnic minority, was arrested about 25 yards north of the border near San Ysidro, Calif., and told an asylum officer that he was fearful of returning to his homeland. The officer found no credible fear, and that finding was upheld by a supervisor and an immigration judge.

Mr. Thuraissigiam was in deportation proceedings when he filed a habeas corpus petition in the federal court. He argued that the asylum officer had failed to elicit important background about his case, including that he had been detained and beaten by Sri Lankan army officers on two occasions, and at one point had been lowered into a well and nearly drowned. He also said there were communication problems between the translator and both the asylum officer and the immigration judge.

As a result, his lawyers argued, he was deprived of “a meaningful right to apply for asylum.”

A district court judge in Los Angeles rejected that argument, but the three-judge appeals court panel, sitting in San Francisco, held that even though an asylum seeker may lack the right to a full trial in immigration court, the Constitution requires a more complete review than what immigration law currently provides.

At its “historical core,” said the 48-page opinion written by Judge A. Wallace Tashima, “the writ of habeas corpus has served as a means of reviewing the legality of executive detention, and it is in that context that its protections have been strongest.”