It didn’t take long for Republican presidential candidates to stake out strikingly anti-Muslim immigration positions following the terrorist attacks in Paris that left at least 129 people dead and over 300 injured. French flags were flown and moments of silence observed across the U.S. and around the world, but Sen. Ted Cruz (R-TX), Sen. Marco (R-FL), Ben Carson, and Donald Trump decided it was an opportunity to stoke anti-immigrant and anti-Muslim fears. The anti-immigrant and Islamophobic comments led President Obama, speaking from the G20 summit in Turkey, to denounce the statements as “shameful.”

Cruz claimed that “there is no meaningful risk of Christians committing acts of terror” so the U.S. should focus on admitting displaced Christians, but it was “lunacy” to allow Muslim refugees into the country.

Rubio outright rejected accepting any Syrian refugees into the U.S. because “there’s no way to background check” them.

Ben Carson said that accepting Syrian refugees into the U.S. would require “a suspension of intellect.”

Donald Trump, doubling down on his anti-immigrant campaign platform, warned that Syrian refugees could be “one of the great Trojan horses.”

Louisiana Governor Bobby Jindal called for sealing the U.S. border, and Sen. David Vitter (R-LA) started a petition to stop Syrian refugees from entering Louisiana.

The comments from Republicans led Obama, speaking to the press at the close of the G-20 Summit today in Antalya, Turkey, to hit back against the growing sentiment on the right to only allow Christian refugees into the country.

Obama pointed to the hypocrisy of politicians who “themselves come from families who benefited from protection when they were fleeing political prosecution,” a jab at Rubio and Cruz, both of whom are the children of Cuban immigrants to the U.S.

“We don’t have religious tests to our compassion,” said Obama, adding that “while I had a lot of disagreements with President George W. Bush on policy, but I was very proud after 9/11 when he was adamant and clear about the fact that this is not a war on Islam.”

Watch Obama’s comments here:

Indeed, fears of an anti-Muslim backlash were fueled after a fan at Lambeau Field in Green Bay Wisconsin shouted “Muslims suck” during a moment of silence for victims of the Paris attack. After the game, Packers quarterback Aaron Rodgers told reporters that he was “disappointed” in the fan who made the comment. “It’s that kind of prejudicial ideology that I think puts us in the position that we’re in today,” said Rodgers.