Omar C. Jadwat, a lawyer with the American Civil Liberties Union representing people and groups challenging the order, said the volume and specificity of the comments from Mr. Trump and his advisers could not be ignored. He was repeatedly pressed by Judge Niemeyer on whether the order was problematic on its own.

“You just don’t want to answer the question of whether this order on its face is legitimate,” Judge Niemeyer said.

Judge King said the two sides were separated by a wide gulf on the central question in the case: that of whether to interpret the order in isolation or in the context of the various statements. “That’s where you all are like ships in the night,” Judge King told Mr. Jadwat. “That’s the most important issue in the whole case.”

The revised order, issued in March, sought to address judicial objections to an earlier one, issued in January. The first order, which caused chaos and drew protests at airports around the nation, was blocked in February by the United States Court of Appeals for the Ninth Circuit, in San Francisco.

The new order’s 90-day suspension of entry from Iran, Libya, Somalia, Sudan, Syria and Yemen was more limited and subject to case-by-case exceptions. It omitted Iraq, which had been listed in the earlier order. It removed a complete ban on Syrian refugees. And it deleted explicit references to religion. Like the earlier order, the new one suspended the nation’s refugee program for 120 days and reduced the annual number of refugees to 50,000 from 120,000.

In March, federal judges in Maryland and Hawaii blocked parts of the new executive order, saying they could not ignore the remarks from Mr. Trump and his allies. “Simply because a decision maker made the statements during a campaign does not wipe them” from judicial memory, Judge Theodore D. Chuang of Federal District Court in Maryland wrote in the decision under review by the appeals court.

Judge Chuang’s ruling blocked the part of the order concerning travel from the six countries.

The court hearing the case on Monday, the United States Court of Appeals for the Fourth Circuit, did not follow its usual practices in considering the appeal. Ordinarily, a three-judge panel would have heard the case and decided it, with the possibility of full-court review afterward.