The US President's executive order on immigration is facing its most significant legal challenge yet
Donald Trump has accused federal courts of being "so political" as he called for the suspension on his travel ban to be lifted.
The suspension of the ban was implemented by a federal judge last week - after the executive order caused chaos at airports around the US. An appeals court from the US is currently hearing the case.
The hearing in San Francisco is the greatest legal challenge yet to the temporary suspension of the nation's refugee programme and on immigration from seven Muslim majority countries.
A panel of three appeal court justices heard arguments from the Trump administration's Department of Justice and opponents of his Executive Order.
A decision is expected later in the week.
Speaking at a gathering of senior law enforcement officers today and quoting from immigration law, President Trump said: "I listened to lawyers on both sides last night, and they were talking about things that had just nothing to do with it.
"I will not comment on the statements made by... certainly one judge. But I have to be honest: if these judges wanted to, in my opinion, help the court in terms of respect for the court, they'd do what they should be doing.
"When you read something so simple, and so beautifully written, and so perfectly written [...] I watched last night in amazement, and I heard things I couldn't believe.
He added: "I don't ever want to call a court biased, so I won't call it biased, and we haven't had a decision yet. But courts seem to be so political, and it would be so great for our justice system if they would be able to read a statement and do what's right. And that has to do with the security of our country, which is so important."
In an unusual move, lawyers for both sides addressed the court by telephone during the hour-long session at the 9th Circuit Court of Appeals last night.
The Trump administration asked the court to restore the Presidential order as - they argue - he alone has the power to decide who can enter or stay in the United States.
But Judge Michelle Friedland asked whether the government had any evidence connecting the seven affected nations to terrorism.
August Flentje, counsel for the US government, cited a number of Somalis in the US who he claimed had links to the terrorist group al Shabaab.
Judge Richard Clifton asked the lawyer for Washington State and Minnesota - which are challenging the ban - what evidence he had that it was motivated by religion when "the vast majority of Muslims would not be affected."
Noah Purcell responded that Trump's public statements on the campaign trail, calling for a ban on Muslims entering the US, showed discrimination.
The states opposing the ban argue that it is unconstitutional and have been supported by a string of former government officials and dozens of major tech firms. They say the ban has impacted business and divided families.
Whatever the court decides, the case is likely to end up at the US Supreme Court. The ban itself was originally intended to last for just 90 days.
Earlier, Mr Trump said he was willing to go all the way to the highest court in the land.
"It could. We'll see. Hopefully it doesn't have to,” he said. “It's common sense. You know, some things are law and I'm in favour of that and some things are common sense. This is common sense."
His new head of Homeland Security had also taken responsibility for the troubled roll-out of the ban.
In a hearing on Capitol Hill, John Kelly said: "In retrospect, I should have - this is all on me, by the way - I should have delayed it so that I could talk to members of Congress - particularly the leadership of committees like this to prepare them for what was coming."