The appeals court judges also pressed Mr. Flentje to explain why the executive order should not be considered a violation of constitutional protections against religious discrimination.

“Could the president simply say in the order we’re not going to let any Muslims in?’’ asked Judge William Canby.

“That’s not what the order does,’’ Mr. Flentje replied. "This is a far cry from that situation.’’

At one point, Mr. Flentje was scrambling to answer the judges’ questions, saying, “I’m not sure I’m convincing the court.’’

Another judge on the panel, Richard Clifton, voiced skepticism about claims the executive order was discriminatory. He pressed a lawyer for the state of Washington, which filed the lawsuit against the government, to explain why the president would not have the authority to bar people from countries that pose a significant risk of terrorism.

“I have trouble understanding why we’re supposed to infer religious animus,’’ said Judge Clifton. “The concern for terrorism with those connected to radical Islamic sects is kind of hard to deny.’’

Mr. Purcell answered that by the president’s own statements, and those of some of his advisers, the executive order grew out of a desire to keep Muslims out of the country.

“At this point it’s now the federal government that’s asking the courts to upset the status quo,’’ Mr. Purcell said. “Things are slowly returning to normal before the chaos of the executive order.’’