Before diving into today's arguments, some background: On January 27th, Trump signed an executive order temporarily banning travelers from seven Muslim-majority countries from entering the United States. The ban affected refugees, visa holders and US permanent residents from Iraq, Syria, Iran, Sudan, Libya, Somalia and Yemen, and was implemented immediately. Authorities detained travelers from these countries at airports across the nation, and others around the world were barred from boarding their flights to the US.

The State Department estimates 60,000 visas were revoked under the ban, not including refugees. There may be an additional 64,000 admitted refugees now barred from entering the US, according to Politifact. The executive order bans refugees from Syria indefinitely, and affects refugees from the remaining countries for 120 days.

As we've noted, a ban on immigration is an attack on Silicon Valley. Google CEO Sundar Pichai and Microsoft CEO Satya Nadella are from India, Google co-founder Sergey Brin is a refugee from Russia, and all large tech companies including Apple, Facebook, Google, Amazon and Microsoft regularly recruit foreign talent. Following the ban, tech companies including Uber, Google and Lyft pledged to donate millions to the ACLU and pro-immigrant causes.

Uber CEO Travis Kalanick gave up his seat on Trump's economic advisory council after a movement to delete the app gained popularity. "Joining the group was not meant to be an endorsement of the president or his agenda," he said. Meanwhile, Tesla and SpaceX CEO Elon Musk has vowed to remain on the council, though he's made a point to bring up the immigration ban and climate change in meetings.

Trump has argued the ban is in the interest of national security. The executive order mentions the terrorist attacks on September 11th, 2001, as an example of the US visa process failing. It's worth noting that most of the 9/11 conspirators came from Saudi Arabia, a country not included in the travel ban. Since 9/11, no one in the US has been killed in a terrorist attack orchestrated by someone from the seven countries named in Trump's executive order.

After the signing, protestors and lawyers looking to help travelers enter the US flooded airports across the country. More than 100 companies in the technology industry, including Google, Apple, Intel and Microsoft, filed an amicus brief in support of lawsuits against the executive order.

The order was quickly challenged in court and last week, Judge James Robart blocked it, allowing immigration to resume. The Ninth Circuit Court of Appeals denied the Trump administration's attempt to overturn the stay -- which brings us to today.

Audio from the hearing was streamed live on YouTube and at one point the video had more than 100,000 viewers (or listeners, in this case). Cable news networks also aired the arguments live.

In presenting his case to the Ninth Circuit Court of Appeals in San Francisco, Justice Department lawyer August Flentje argued the president has the authority to determine risks to national security and react with an executive order like the travel ban.

"Are you arguing the president's decision in that regard is unreviewable?" asked Judge Michelle Friedland, an appointee of Barack Obama.

"Yes," Flentje responded.

The judges -- Friedland, George W. Bush appointee Richard Clifton and Jimmy Carter appointee William Canby Jr. -- then pressed Flentje on allegations that the Trump administration conceived of the travel ban in "bad faith"; essentially, that it was intended to be a Muslim ban in everything but name. Flentje argued the executive order should be considered as it was written: "Any review should be confined to the four corners of the document."

Judge Canby then pressed the limits of Flentje's argument that the president's judgement on national security was above review, asking, "Could the president simply say in the order, 'We're not going to let any Muslims in?'"

Flentje answered, "This is a far cry from that situation," noting that the order doesn't discriminate on the basis of religion. He continually suggested that Washington state had no legal standing to sue in this matter.

And then, the tables turned. Washington Solicitor General Noah Purcell argued for the state's ability to sue on the basis of proprietary harms including lost tax revenue and university faculty members being stranded overseas, and parens patriae—the theory that the government is the legal protector of people who are unable to protect themselves.

During Purcell's arguments, the judges discussed whether the order was unconstitutional on the basis of religious discrimination. Judge Clifton noted the majority of Muslims worldwide would not be affected by the travel ban, and Purcell argued he did not have to prove the order affected all or only Muslims, but that it was conceived as a tool to discriminate against Muslim people. This is the bad-faith argument the judges alluded to with Flentje.

Purcell said there was "shocking evidence of intent to discriminate against Muslims" by the Trump administration, including public statements from the president and his aides.

In his rebuttal, Flentje argued the state's case was based on newspaper articles reporting what Trump and his administration have said. Judge Clifton pressed Flentje for clarification, asking, "Do you deny that those statements were made?"

"Those are on the record," Flentje eventually conceded. He ended his time by requesting the judges stay the injunction or limit it to Washington state alone. Judge Friedland promised the court would rule "as soon as possible."