Earlier this year, President Trump issued an executive order that would ban people from several predominantly Muslim countries from entering the United States.

The order also banned refugees from entering the United States, regardless of the country from which they came. On Monday, the Supreme Court unanimously decided to hear a case challenging the order. When it does, the court should rule that the order is unlawful — because it is.

First, the order violates the Constitution. Our nation was founded by refugees who fled religious persecution, risking their lives in search of freedom to worship as their hearts and souls commanded. Rooted in their experience, the First Amendment’s Establishment Clause and Free Exercise Clause prohibit the government from establishing a national religion or dictating religious beliefs.

That means my grandpa can attend his Catholic services, my father-in-law can attend his Sikh services, and you can attend your own religious service, whatever that may be — all without government interference. And that’s the way it should be: we find strength in our diversity, including our diversity of faiths.

But the order says that our Muslim brothers and sisters are not welcome here — simply because of their religion. The president himself described the order as a “total and complete shutdown on Muslims entering the United States.” That violates both the spirit and the letter of the First Amendment—and it is deeply offensive to anyone who values religious freedom.

Second, the executive order violates federal immigration statutes. The Immigration and Nationality Act of 1965, enacted during the height of the civil rights movement, states that no person “shall be discriminated against in the issuance of an immigrant visa” based on “nationality, place of birth, or place of residence.” Yet that is precisely what the executive order does: it bans immigrants based solely on their nationality or the place from which they come. That is illegal.

Third, the president enacted the order to make America safe, but the order has precisely the opposite effect. It compromises valuable relationships with Muslim communities at home and abroad, and it serves as a recruitment tool for extremists who wish to portray America as hostile to Islam. Of course we need to secure our borders and keep America safe; there is no dispute about that. But using rote stereotypes as a substitute for individualized threat assessments undermines our security and makes us vulnerable.

The order is not just unlawful; it is a stain on American values. The text inscribed on the Statue of Liberty opens a golden door to the world’s huddled masses, yearning to breathe free; the text of the president’s executive order closes that door, turns our backs on those in need, and erodes our moral standing in the world. And it does all of that while making us less safe, not more secure. That’s shameful. It is not who we are. And the Supreme Court should say so.

Joshua Riley is an Endicott native. He served as counsel on the Senate Judiciary Committee and has co-authored briefs in the travel ban litigation.