Is Donald Trump's executive order banning Muslims even legal? You won't like the answer.

President Donald Trump signed an executive order Fridaythat will affect the lives of millions of refugees, immigrants and Muslims in the United States and abroad.

The executive order includes a four-month ban on all refugees — with the exception of religious minorities — and a 90-day visa suspension of immigrants and visitors from Muslim-majority countries Iran, Iraq, Libya, Yemen, Sudan, Syria and Somalia.

It also commands the Department of Homeland Security to expedite the implementation of a "biometric entry-exit tracking system" for immigrations in "high-risk countries." According to the Electronic Frontier Foundation, biometric technology paves the way for usage of a database similar to a Muslim registry. For instance, biometric screenings were used for the National Security Entry-Exit Registration System to track, monitor and identify immigrants based on physical and behavioral characteristics.

It doesn't take a policy expert to read between the lines: This executive order is a blatant attempt to prevent Muslim immigrants and refugees from entering the United States.

Is this even legal?

The 1952 Immigration and Nationality Act includes language — clause 212(f) — giving the president full power to ban "any aliens or any class of aliens" as long as the president can prove they are at odds with U.S. interests.

Here is the clause in full:

Whenever the president finds that the entry of any aliens or of any class of aliens into the United States would be detrimental to the interests of the United States, he may by proclamation, and for such period as he shall deem necessary, suspend the entry of all aliens or any class of aliens as immigrants or nonimmigrants, or impose on the entry of aliens any restrictions he may deem to be appropriate.

In layman's terms, Trump can indeed ban or create entry restrictions against any immigrant at any time, so long as he argues they pose a risk to U.S. interests. The Trump administration made this clear in the title of its executive order: "Protecting the Nation from Terrorist Attacks by Foreign Nationals."

Here's where it gets interesting.

Congress passed the Immigration and Nationality Act during the second red scare under Harry Truman's administration. Truman, who would've been granted ultimate control of banning whomever he'd like, vetoed the bill, but Congress overrode the veto.

It's not too difficult to compare the current refugee and anti-Muslim hysteria withthe McCarthy Era of the late '40s and '50s. The only difference, however, is that the president who dropped the atomic bomb on Hiroshima and Nagasaki had far more compassionate words for refugees than Trump.

"We do not need to be protected against immigrants from these countries — on the contrary, we want to stretch out a helping hand, to save those who have managed to flee into Western Europe, to succor those who are brave enough to escape from barbarism, to welcome and restore them against the day when their countries will, as we hope, be free again," Truman said in his veto message.

Isn't Trump violating the First Amendment?

People in New York’s Washington Square Park hold signs as the Council on American-Islamic Relations holds a protest against President Donald Trump's planned ban on Muslim travel.Source: Bryan R. Smith/Getty Images

While the executive order singles out Muslim-majority countries — and Trump has a history of espousing anti-Muslim rhetoric — challenging the executive order on religious discrimination is a hard case to prove.

The executive order restricts all refugees for at least 120 days but offers — not grants — exemption for those who feel persecuted in a country where they are a religious minority. Even so, Trump has full power to limit refugee admissions.

As for visa restrictions, the United States has bombed or "violently intervened" either through economic sanctions or regime change in all seven of the aforementioned countries — eventually resulting in the political instability of Sudan and Iran and the destabilization of war-torn Syria, Yemen, Libya, Iraq and Somalia. The DHS now labels Iran and Sudan as "state sponsors of terrorism" and the other five countries as "areas of concern," according to the Intercept.

Furthermore, the areas where Trump is restricting visas are based on a list of countries restricted under a visa waiver program President Barack Obama signed in February 2016 in the aftermaths of the Paris and San Bernardino attacks. In addition, President George W. Bush signedthe 2002 Enhanced Border Security and Visa Reform Act, which contained a clause issuing visa restrictions to immigrants or visitors coming from "state sponsors of terrorism."

Are there ways to challenge Trump's executive order?

Hundreds of people attend an evening rally Wednesday at Washington Square Park to support Muslims and immigrants and to oppose the building of a wall along the Mexican border.Source: Spencer Platt/Getty Images

Well, some things ordinary Americans can do are stand in solidarity with those affected by the executive order, to organize and call their lawmakers.

Congress would have to create a new bill to either void Trump's executive order or nullify the clause in 212(f) under the Immigration and Nationality Act. Congress would need a two-thirds majority in both the House and Senate in favor of the bill — which Trump could then veto, requiring another two-thirds majority vote to override.

But withthe House and Senate under Republican control and without serious pushback against lawmakers from concerned citizens, there's a slim-to-none chance of that happening.

The other option is to wait four years, elect a new president and pressure him or her to sign an executive order that cancels this one. Unfortunately, though, that might be a little too late.