RICHMOND, Va.-- Federal appeals court judges in Virginia peppered a government lawyer Friday with questions about President Donald Trump's latest travel ban and whether the president has the authority to ban 150 million foreign nationals -- mostly Muslims -- from the United States.

A full panel of 13 judges from the 4th U.S. Circuit Court of Appeals heard arguments on the third version of Trump's travel ban. It was the second federal appeals court to hear a challenge to the ban this week, following a hearing Wednesday before the San Francisco-based 9th Circuit.

The hearing came four days after the U.S. Supreme Court said it would allow the travel restrictions to go into full effect, at least until the two appeals courts ruled on separate lawsuits challenging the ban.

The 4th Circuit is being asked to reverse a decision by a Maryland judge whose injunction in October barred the administration from enforcing the ban against travelers from Chad, Iran, Libya, Somalia, Syria and Yemen who have bona fide relationships with people or organizations in the U.S.áNorth Korea and Venezuela are also included, but to a much narrower extent.

Deputy Assistant Attorney General Hashim Mooppan told the judges that the latest travel restrictions were the product of a global, multiagency review that found the countries do not share enough security-related information with the United States. He insisted the latest travel ban is not anti-Muslim, but is necessary for national security.

"The proclamation says there's inadequate information sharing from these eight countries or other risk factors that undermine visa vetting, and to deal with that problem -- a particular aspect of the broader terrorism problem -- they are imposing entry restrictions to those (countries) to improve those practices and protect this nation until they do so," Mooppan said.

Cecillia Wang, a deputy legal director at the national American Civil Liberties Union, told the judges that the ban is a manifestation of Trump's campaign promise to keep Muslims out of the United States. Wang cited various statements made by Trump and anti-Muslim videos he retweeted on Nov. 29, saying he has "doubled down" on his pledge.

"It's clear on the record that the president has continued to make statements of hostility toward Muslims," Wang said.

The judges differed on whether they should consider Trump's statements and tweets. Judge Paul Niemeyer called Trump's statements "background noise," while Judge James Wynn asked if the court should "ignore reality" and just look at the legality of the travel ban.

The 4th Circuit cited Trump's remarks on Muslim travelers while rejecting an earlier version of the travel ban in May, finding that it "drips with religious intolerance, animus and discrimination" toward Muslims.

Trump announced his initial travel ban on citizens of certain Muslim-majority nations in late January, bringing havoc and protests to airports around the country. A federal judge in Seattle soon blocked it, and courts since then have wrestled with the restrictions as the administration has rewritten them. The latest version blocks travelers from the listed countries to varying degrees, allowing for students from some of the countries while blocking other business travelers and tourists, and allowing for admissions on a case-by-case basis.

It is unclear when the appeals courts will rule, though both sides expect the U.S. Supreme Court will ultimately decide on the legality of the ban.