Former House Speaker Newt Gingrich’s suggested Sharia Law test for Muslims in the United States drew predictable howls of protest Friday — but some anti-terrorism experts said the country urgently needs to address the underlying issue.

Gingrich made his comments to Fox News host Sean Hannity Thursday evening in the wake of a deadly terror attack in the French city of Nice.

“Let me be as blunt and as direct as I can be: Western civilization is in a war.”

“Let me be as blunt and as direct as I can be: Western civilization is in a war,” he said. “We should, frankly, test every person here who is of a Muslim background, and if they believe in Sharia, they should be deported. Sharia is incompatible with Western civilization.”

Gingrich added that it should be a felony to host or visit websites favoring the Islamic State, al-Qaeda, and other terrorist organizations.

Former George W. Bush communications adviser Nicolle Wallace slammed the proposal on “Morning Joe” Friday.

“Newt knows better,” she said. “The thing about Donald Trump when he says these things is he’s trying to react to what he thinks people feel, and he’s right more than he’s wrong … Newt Gingrich knows better. He’s served in Congress. He knows better than to say these things.”

Counter-terrorism experts agree that Gingrich’s off-the-cuff proposal would need to undergo changes before it could be translated into actual policy. U.S. citizens who are Muslim, for instance, could not be deported. And any attempt to criminalize the viewing of extremist websites would be difficult under the First Amendment. Kyle Shideler, director of threat assessment at the Washington-based Center for Security Policy, noted that such a law could get terrorism researchers like himself in trouble.

[lz_third_party includes=”http://video.foxnews.com/v/embed.js?id=5036444136001″]

But Shideler said practices like website usage could be used as part of a strategy to identify possible threats to national security and then act quickly if the person crosses the line into criminal behavior.

“Activities can be observed and prohibited,” he said. “We’re talking about behavior.”

Who do you think would win the Presidency?

By completing the poll, you agree to receive emails from LifeZette, occasional offers from our partners and that you've read and agree to our privacy policy and legal statement.

Daniel Pipes, president of the Philadelphia-based Middle East Forum, agreed that the proposal outlined Thursday would be overly broad. He said Sharia includes instruction on how to pray and other matters that do not touch on violent jihad.

“I agree with the sentiment but disagree with the particulars,” he said. “Sharia is, indeed, the crux of the matter. But Sharia includes all sorts of benign elements that every Muslim would agree with.”

The United States has a long history of targeting foreigners based on ideology. For instance, presidents have long used the power of their office to deny visas to foreigners based on their ties to unfriendly governments or anti-American organizations.

In 1940, President Franklin D. Roosevelt signed the Alien Registration Act, saying it “should be interpreted and administered as a program designed not only for the protection of the country but also for the protection of the loyal aliens who are its guests.”

Congress in 1950 overrode President Harry S. Truman’s veto to pass the Internal Security Act to crack down on communist sympathizers.

The Supreme Court later struck down large portions of both laws, and experts agreed any effort to target Sharia sympathizers would need to be carefully calibrated. Pipes suggested Gingrich’s proposal is a starting point.

“It has to be done with great intelligence,” said Pipes, who served on the board of directors of the U.S. Institute of Peace in the Bush administration. “This is a valid topic for discussion.”

John Feere, a legal policy analyst for the Center for Immigration Studies, said it would be difficult to deport immigrants merely for their beliefs. But he said the country could probably ask a series of questions of foreigners about their beliefs in extremist ideology and then boot them out if it could be shown that they lied.

“That is something the public is open to having a conversation about,” he said.

Pipes said it is instructive to study how other countries confront the threat of terrorism. He noted that French teachers, for instance, are told to keep an eye out for jihadi sentiment. One can imagine the reaction in the United States if someone proposed that teachers play that kind of role.

“The French are much tougher,” he said. “In a sense, it’s an experiment on how to deal with this.”

[lz_related_box id=”158284″]

Shideler said Congress could “cut out the middleman” by passing the Muslim Brotherhood Terrorist Designation Act, a bill pending in the House and Senate that would declare the group a terrorist organization. He noted that the federal government also has the authority to deport foreigners who gain entry under false pretenses. Lying about their adherence to an ideology that calls for overthrowing constitutional government in favor of Sharia would qualify, he said.

Shideler pointed to a 2011 study, the Shariah Adherence Mosque Survey, which found that 80 percent of U.S. mosques provide their worshipers with jihad-style literature promoting the use of violence against non-believers. He said Sharia should be understood as more than a mere religious code of private conduct.

“It is a system of law and body of law developed over many centuries,” he said.