The Council on American-Islamic Relations on Friday condemned the deadly truck attack in Nice, France — but assailed Newt Gingrich’s call to “test” Muslims in the US.

“We condemn this bloody massacre as we have condemned previous ISIS or ISIS-inspired atrocities and the deviant ideology that produces such senseless and cowardly violence,” CAIR National Executive Director Nihad Awad said in a statement.

“We are praying for the people of Nice, the victims of another outrageous attack on humanity,” he said about the massacre, for which no group has claimed responsibility.

Gingrich, a former speaker of the House who has been under consideration as Donald Trump’s potential running mate, told Fox News after the attack that “every person here who is of a Muslim background” should be checked for whether they believe in Sharia law — and be deported if they do, even if they are US citizens.

He added that anyone who even just visits any website “favoring ISIS or al Qaeda or other terrorist groups” should be guilty of a felony, “and they should go to jail.”

“Western civilization is in a war,” he said. “Sharia is incompatible with Western civilization. Modern Muslims who have given up Sharia — glad to have them as citizens. Perfectly happy to have them next door. But we need to be fairly relentless about defining who our enemies are.”

Awad said Gingrich’s rhetoric helps groups like ISIS that seek to paint the West as anti-Muslim, NBC News reported.

“When former House Speaker Newt Gingrich suggests that American-Muslims be subjected to an Inquisition-style religious test and then expelled from their homes and nation, he plays into the hands of terror recruiters and betrays the American values he purports to uphold,” Awad said.