RICHMOND, Va. (Reuters) - Federal appeals court judges on Monday peppered a U.S. Justice Department lawyer with tough questions about President Donald Trump’s temporary ban on travelers from six Muslim-majority nations, with several voicing skepticism that protecting national security was the aim of the policy, not religious bias.

FILE PHOTO: A member of the Al Murisi family, Yemeni nationals who were denied entry into the U.S. last week because of the recent travel ban, shows the cancelled visa in their passport from their failed entry to reporters as they successfully arrive to be reunited with their family at Washington Dulles International Airport in Chantilly, Virginia, U.S. February 6, 2017. REUTERS/Jonathan Ernst/File Photo

Six Democratic appointees on a court dominated by judges named by Democratic presidents showed concerns about reviving the Republican president’s March executive order that prohibited new visas to enter the United States for citizens of Iran, Libya, Somalia, Sudan, Syria and Yemen for three months.

But three Republican appointees on the Richmond, Virginia-based 4th U.S. Circuit Court of Appeals seemed to lean toward the administration, asking whether the president should be second-guessed when it comes to protecting the country’s borders and whether the plaintiffs bringing the suit had been sufficiently harmed by the order during arguments before 13 judges.

Based on the judges’ questions, a ruling could hinge on whether the appeals court agrees with a lower court judge that past statements by Trump about the need to prevent Muslims from entering the United States should be taken into account. That would be bad news for a young administration seeking victory on one of its first policy changes.

“This is not a Muslim ban,” Acting Solicitor General Jeffrey Wall, arguing for the government, told the judges during the hearing that lasted two hours, twice as long as scheduled.

Judge Robert King, named by Democratic former President Bill Clinton, told Wall that Trump has never retracted previous comments about wanting to impose a ban on Muslims.

“He’s never repudiated what he said about the Muslim ban,” King said, referring to Trump’s campaign promise for a “total and complete shutdown of Muslims entering the United States.”

POLITICAL DEBATE

Wall told the judges past legal precedent holds that the court should not look behind the text of the Trump’s executive order, which does not mention any specific religion, to get at its motivations. He warned that despite the “heated and passionate political debate” about the ban, there was a need to be careful not to set legal precedent that would open the door to broader questioning of presidential decision making on security matters.

Judge Paul Niemeyer, appointed by Republican former President George H.W. Bush, told Omar Jadwat, the American Civil Liberties Union lawyer representing the plaintiffs who challenged the order, that they were asking the court to rule on a president’s national security judgments.

“You have the judiciary supervising and assessing how the executive is carrying out his office,” Niemeyer said, pressing Jadwat, who seemed to stumble at times after pointed questioning by the judges. “I just don’t know where this stops.”

The revised travel ban was challenged in Maryland by refugee organizations and individuals who said they were being discriminated against because they were Muslim and because they had family members adversely affected by the ban. They argue the order violated federal immigration law and a section of the U.S. Constitution’s First Amendment barring the government from favoring or disfavoring a particular religion.

The administration appealed a March 15 ruling by Maryland-based federal judge Theodore Chuang that put the ban on hold just a day before it was due to go into effect.

The arguments marked the latest legal test for Trump’s ban, which also was blocked by federal judge Derrick Watson in Hawaii in a separate legal challenge. An earlier version of the ban was also blocked by the courts.

Chuang, in Maryland, blocked the part of Trump’s order relating to travel by people from the six countries. Watson, in Hawaii, also blocked another part of the order that suspended the entry of refugees into the United States for four months.

‘HOW IS THIS NEUTRAL?’

To a packed audience in the ornate pre-Civil War era courthouse, Judge Pamela Harris said Trump’s action clearly had a disparate impact on Muslims, asking, “How is this neutral in its operation as to Muslims?” Judge Barbara Keenan, who like Harris was appointed by Democratic former President Barack Obama, said the order could affect some 200 million people.

Regardless of how the 13 judges rule, the matter is likely to be decided ultimately by the U.S. Supreme Court. The full 4th Circuit took up the appeal but two Republican-appointed judges did not participate. That left nine judges appointed by Democratic presidents, three Republican appointees and one judge originally appointed by a Democrat and later re-appointed by a Republican.

It was unclear when the court would rule.

Trump issued the March executive order after federal courts blocked an earlier version, issued on Jan. 27 a week after he took office, that also had included Iraq among the nations targeted. That order, which went into effect immediately, triggered chaos and protests at airports and in several cities before being put on hold due to legal challenges.

The second order was intended to overcome the legal problems posed by the original ban.

The administration’s appeal in the Hawaii case will be heard in Seattle on May 15 by a three-judge panel of the San Francisco-based 9th U.S. Circuit Court of Appeals. The three judges assigned all are Democratic appointees.

Wall said the temporary ban was intended to give the government time to evaluate whether people from the six countries were being subjected to adequate vetting to ensure they did not pose a security threat to the United States.

But he said the administration had not been able to proceed on all the work it wanted to do because of the litigation, noting “we have put our pens down.”