WASHINGTON — A Justice Department lawyer on Tuesday said courts should not second-guess President Trump’s targeted travel ban, drawing skepticism from a three-judge federal appeals panel weighing the limits of executive authority in cases of national security.

But even August E. Flentje, the Justice Department’s lawyer, sensed he was not gaining ground with that line of argument. “I’m not sure I’m convincing the court,” Mr. Flentje said.

It was a lively but technical hearing on an issue that has gripped much of the country’s attention — and that of foreign allies and Middle East nations — for the past week. Issued without warning on Jan. 27, just a week after Mr. Trump took office, the executive order disrupted travel and drew protests at the nation’s airports by suspending entry for people from seven predominantly Muslim countries and limiting the nation’s refugee program.

No matter how the United States Court of Appeals for the Ninth Circuit rules — in a decision that is expected within days — an appeal to the United States Supreme Court is likely. That court remains short-handed and could deadlock. A 4-to-4 tie in the Supreme Court would leave the appeals court’s ruling in place.