President Barack Obama slammed Sen. Ted Cruz (R-Texas) on Wednesday for the presidential hopeful's statements that he would empower law enforcement to “patrol and secure Muslim neighborhoods“ in the wake of the deadly terror attacks in Brussels.

"I just left a country that engages in that kind of neighborhood surveillance, which, by the way, the father of Sen. Cruz escaped for America, the land of the free," Obama said during a press conference in Argentina, referring to his historic trip to Cuba earlier this week.

He said the proposal “makes absolutely no sense” and goes against basic American values.

The Republican presidential candidate, a Cuban-American, has been deeply critical of Obama's strategy to destroy the so-called Islamic State. He said Tuesday's attacks in Brussels were more evidence that Obama needs to address the root of the problem.

“It is way past time we have a president who will acknowledge this evil and will call it by its name and use the full force and fury to defeat ISIS,” Cruz said in a press conference on Tuesday. “Until they are defeated, these attacks will continue. Their target is each and every one of us.”

“We need a president who sets aside political correctness,” Cruz insisted. “We don’t need another lecture about Islamophobia.”

Cruz's comments drew fire from Muslim advocacy groups, Democrats, the police commissioner of New York City and even one of his rivals for the GOP nomination, Ohio Gov. John Kasich.

Obama also criticized proposals to bomb ISIS positions in Syria and Iraq indiscriminately. Cruz has called for "carpet bombing" terrorists, a strategy that would endanger civilians.

"We don’t go and blow something up just so we can say that we blew something up. That's not a military strategy," Obama said.

Cruz's comments on Muslim surveillance come amid a wave of anti-Islamic sentiment in the United States, which has only grown with the candidacy of Donald Trump after last year's terror attacks in Paris and mass shooting in San Bernardino, California. Reports about American Muslims facing violence, harassment and intimidation, especially, are on the uptick.

The contours of anti-Muslim sentiment have grown notably more partisan in recent years, with Republicans today more likely than they were in 2002 to say many U.S. Muslims are anti-American. In recent polls, Republicans are more than twice as likely as Democrats to express a strongly unfavorable view of the Islamic religion.

Republican voters are largely sympathetic to the Islamophobic opinions dominating their party's national dialogue.

While Republicans in a January Pew survey blamed religious violence mostly on those who use religion as a justification, most also support Trump's proposal for a temporary ban on Muslims entering the U.S. In state primary exit polls to date, between 63 percent and 78 percent of GOP voters agreed with such a ban.

Nearly two-thirds of Republican voters say the next president should "speak bluntly about Islamic extremists even if the statements are critical of Islam as a whole."

This post has been updated with information about Americans' views on anti-Muslim sentiment.

Ariel Edwards-Levy contributed to this report.