Donald Trump lit off a firestorm with his call for a ban on all Muslims entering the United States. The deadly threat of Islamist terror and the migrant violence in Europe make a ban on Muslim immigration seem like a reasonable solution.

But we have Muslim allies, the King of Jordan for example, who would be affected by such an action. So if banning all Muslims is not the perfect solution, how can we deal with the ones who are a serious problem without alienating our allies?

The Center for Security Policy just released a white paper detailing how to do that entitled “Stop Importing Jihadists: Making Sharia-Supremacism a Bar to Immigration and Naturalization.” It explains how existing laws can be used to stop allowing Muslims from coming to this country who do not share our American values. This does not mean all Muslims, but it is a significant number who believe the totalitarian Islamist code called Sharia should be placed above the U.S. Constitution.

U.S. citizens have rights. But clearly, there are no rights for non-citizens to visit or migrate to the United States. It is a privilege. We need to make sure that anyone coming here doesn’t believe their mission is to bring with them an antiquated and barbaric system to impose on us. We have the authority under current law to stop members of totalitarian ideologies from infiltrating and working to subvert our free system.

The problem is not Muslims per se; it is Islamic Supremacists who push the totalitarian ideology called Sharia. Unfortunately, this is a significant number of Muslims worldwide; a Pew International poll shows more than half of them believe Sharia should be the law of their land. Most also believe this law should apply to non-Muslims, as well. That could hardly be more un-American and we have every right to tell those folks “That’s not how we do things here.”

There are differing versions of Sharia, but they agree that the practice of all aspects of life is governed by the unassailable word of Allah and not one single bit of it may be questioned. That includes an ironclad prohibition on any man-made law superseding Sharia and a requirement for believers to actively work to impose it everywhere. This makes it impossible for a Sharia-adherent Muslim to swear an oath to obey the U.S. Constitution or any other country’s governing document. There can be no agreement to render unto Caesar that which is Caesar’s, Caesar must submit to Allah.

That single fact makes it prudent to restrict immigration by anyone who holds those beliefs. We have done this previously to stop totalitarian communists and fascists from infiltrating with a mind to undermine our society from within. That subversion is actually the very goal articulated by groups such as the Muslim Brotherhood for its operations here in the United States: “The Ikhwan [Muslim Brotherhood] must understand that their work in America is a kind of grand jihad in eliminating and destroying the Western civilization from within and ‘sabotaging’ its miserable house.”

It makes perfect sense to say to a group that wants to destroy us “from within” that “you are not welcome to come in.”

The dividing line we need to use for making policy is Sharia; the practice of Sharia is simply not compatible with life in the U.S. It is also the dividing line between Medieval Islam, with its abhorrent practices such as death for homosexuals; stoning for victims of rape; forced marriages and genital mutilation for girls; and Modern Islam, which could properly be called post-Sharia. The problem is Modern Islam does not truly exist yet. There are Muslims who do not practice or believe in the barbaric acts Sharia requires, but they are technically apostates, defectors of Islam, and the penalty for leaving is death.

The current state of play has members of the medieval form acting as the loudest voices of the “Muslim” community. Those who wish to practice a modern version do so at their own peril: they face shunning at best and death at worst. The medieval practitioners are aided in this effort by vast support; even the U.S. government has embraced them both abroad, by supporting groups like the Muslim Brotherhood, and here at home, in the form of the Council on American-Islamic Relations (CAIR) and others.

Our U.S. government has a responsibility to safeguard this country and our way of life. That includes banning those who wish to destroy us from entering the United States. We must add Sharia to the list of totalitarian ideologies that trigger this prohibition. This will help all Americans including Modern Muslims who just want to live in peace in the land of the free.