A US federal appeals court has questioned whether a travel ban ordered by President Donald Trump unfairly targeted people from seven Muslim-majority countries.

During an oral argument lasting more than an hour, a three-judge panel of the 9th US Circuit Court of Appeals pressed a government lawyer on Tuesday over whether the Trump administration's national security argument was backed by evidence that people from the seven nations posed a danger.

The San Francisco-based 9th Circuit said at the end of the session it would issue a ruling as soon as possible, thought to be this week. The matter is ultimately likely to go to the US Supreme Court.

WATCH: The media, Muslims and Trump's travel ban

"I actually can't believe that we're having to fight to protect the security, in a court system, to protect the security of our nation," Trump said on Tuesday.

US government asks court to reinstate Trump travel ban

"This is a very dangerous period of time because while everybody is talking and dealing, a lot of bad people are thinking, 'Hey, let's go in right now'."

The president's January 27 order barred travellers from Iran, Iraq, Libya, Somalia, Sudan, Syria and Yemen from entering for 90 days and all refugees for 120 days, except refugees from Syria, whom he would ban indefinitely.

The order sparked protests and chaos at US and overseas airports. Opponents also assailed it as discriminatory against Muslims in violation of the US Constitution and applicable laws.

Minnesota and Washington states are challenging the ban.

OPINION: Trump's Muslim ban is a dangerous distraction

Lawyer August Flentje represented the Trump administration in court on Tuesday.

When asked by the judges what evidence was used to connect the seven countries with attacks in the US, he said the "proceedings have been moving very fast" - without giving specific examples.

"I'm not sure I'm convincing the court," Flentje said at one point.

Noah Purcell, solicitor general for the state of Washington, began his argument urging the court to serve "as a check on executive abuses.

"The president is asking this court to abdicate that role here," Purcell said. "The court should decline that invitation."

Trump frequently promised during his 2016 election campaign to curb undocumented immigration, especially from Mexico, and to crack down on "Islamic terrorism".

OPINION: The US Muslim ban and the story of my Iraqi father

A federal judge in Seattle suspended Trump's order last Friday and many travellers who had been waylaid by the ban quickly moved to travel to the United States while it was in limbo.

Syrian immigrant Mathyo Asali said he thought his life was "ruined" when he landed at Philadelphia International Airport on January 28 only to be denied entry to the United States.

Asali, who returned to Damascus, said he believed he'd be inducted into the Syrian military. He was back on US soil on Monday.

"It's really nice to know that there's a lot of people supporting us," Asali said.

Michael Shure, a Los Angeles-based writer and political analyst, told Al Jazeera the legal battle was likely to be a long one for the Trump administration.

"This is almost new law here, so when it was handed down in such a way lawyers felt 'we can go to the courts with this - we can go and say this is unconstitutional', which is what these lawyers are doing in San Francisco," said Shure. 

Former FBI agent: Muslim ban 'not about security' - UpFront

Source: Al Jazeera and news agencies