Justice Alito said there was no reason for the official to determine that Mr. Thuraissigiam faced a credible fear of persecution. “All he said was that people drove up and they beat me,” Justice Alito said. “And that’s it.”

Mr. Gelernt said his client’s account was consistent with documented instances of abuses directed against Tamils in Sri Lanka. “There is an exact M.O. on how Tamil people are persecuted in Sri Lanka,” Mr. Gelernt said. “Men arrive in a white van. They abduct the person. They blindfold the person. They beat and torture him.”

Mr. Thuraissigiam filed a petition for writ of habeas corpus in federal court. A trial judge rejected it, saying it was barred by the 1996 law. But a three-judge panel of the United States Court of Appeals for the Ninth Circuit ruled the law unconstitutional, saying that it violated the Constitution’s Suspension Clause. The clause says that “the privilege of the writ of habeas corpus shall not be suspended, unless when in cases of rebellion or invasion the public safety may require it.”

At Monday’s argument in the case, Department of Homeland Security v. Thuraissigiam, No. 19-161, the two sides disagreed about the effect of a ruling allowing judicial review.

Mr. Gelernt said habeas petitions from asylum seekers would be rare. In the year since the Ninth Circuit has allowed them, he said, only about 30 of more 9,000 immigrants denied asylum have filed such petitions.

Edwin S. Kneedler, a lawyer for the federal government, said he was aware of about 100 petitions. “The potential for a flood would be, of course, far greater if this court holds that there is a right to file,” he said.

Justice Ruth Bader Ginsburg asked whether it was significant that Mr. Thuraissigiam was apprehended inside the United States. Mr. Gelernt said that people denied asylum at ports of entry should also be allowed to go to court.