The Republican and Democratic presidential candidates collided sharply Tuesday in the wake of the deadly terrorist attacks in Brussels, with GOP hopeful Ted Cruz calling on law enforcement to “patrol and secure Muslim neighborhoods” and his Democratic rivals sternly rebuking him.

The uproar highlighted the deepening rift between Republicans and Democrats on an issue that was poised to gain a fresh foothold in the campaign: the treatment of Muslim Americans amid concerns about terrorism.

Democratic presidential front-runner Hillary Clinton tweeted that Cruz’s proposal was “beneath us,” while Sen. Bernie Sanders of Vermont said that singling out a religious group would be “unconstitutional” and “wrong.”

Cruz faced only muted criticism from his own party, with Donald Trump — who has called for a ban on the entry of Muslims into the United States — voicing support for the senator’s plan.

Cruz, Trump and Ohio Gov. John Kasich (R) also took sharp aim at President Obama, portraying his national security strategy as weak. Kasich called on him to cut short his historic trip to Cuba.

Republican presidential hopeful John Kasich responded to the deadly blasts in Brussels at a news conference in Minneapolis, saying the attack shows that the presidency isn't “a position for somebody who needs to get on-the-job training.” (Reuters)

Cruz first presented his idea in a written statement that endorsed aggressive steps against a domestic attack but offered few specifics about how they would be implemented.

“We need to immediately halt the flow of refugees from countries with a significant al Qaida or ISIS presence,” the statement read. “We need to empower law enforcement to patrol and secure Muslim neighborhoods before they become radicalized.”

Asked later to elaborate, Cruz told reporters in New York that he would effectively revive a defunct and controversial counterterrorism program there that targeted Muslims.

“You would continue the proactive policing that we saw here in New York,” Cruz said. “You would reinstate the program.”

[NYPD settles lawsuits over Muslim monitoring]

Asked on CNN whether Cruz’s plan was something he would support, Trump responded: “Yes, I would. I think that’s a good idea.”

The GOP front-runner also told CNN that if the authorities had tortured the Paris bombing suspect they recently took into custody in Brussels, he might have provided them with information they could have used to prevent Tuesday’s attacks. “I would be willing to bet that he knew about this bombing that took place today,” Trump said.

Republican front-runner Donald Trump calls Brussels “a disaster” the morning after deadly blasts rocked the Belgian capital. Democratic front-runner Hillary Clinton urges the United States to “reaffirm our solidarity with our European friends.” (Sarah Parnass/The Washington Post)

Kasich struck a different tone on Cruz’s proposition. “We are not at war with Islam,” he told reporters while campaigning in Minnesota. “We are at war with radical Islam.”

Democrats swiftly condemned Cruz’s idea.

“Muslim Americans: this is your country, too. These kinds of proposals are dangerous, hateful, and beneath us,” Clinton wrote in a Twitter message.

Speaking to reporters in Flagstaff, Ariz., one of three states holding Democratic nominating contests Tuesday, Sanders stood firmly against Cruz’s plan.

“I strongly disagree,” he said. “It would be unconstitutional. It would be wrong. We are fighting a terrorist organization, a barbaric organization that is killing innocent people. We are not fighting a religion.”

Lanhee Chen, a Hoover Institution research fellow who served as chief policy adviser to 2012 Republican nominee Mitt Romney, said that while he understands why Cruz would warn about a domestic terrorist attack, his word choice was questionable.

“I’m not sure that sort of policy prescription, if you can call it that, is really playing to our better instincts,” said Chen, who also advised Sen. Marco Rubio’s now-shuttered presidential campaign.

The New York City effort cited by Cruz involved a secretive unit of detectives that mapped the Muslim community, spying on businesses and mosques and documenting conversations.

The unit, which was revealed in news reports, angered Muslims in New York who felt they were targeted solely because of their religion. While praised by some, the unit never generated a terrorism lead and was doing little by the time Mayor Bill de Blasio and New York Police Commissioner William J. Bratton got rid of it.

Cruz said de Blasio did away with the program because of “political correctness.”

Monica Klein, de Blasio’s deputy press secretary, said in an email: “This is blatantly false. Now we know why everyone is calling Ted Cruz a liar.”

[Shouts of ‘liar’ are taking a toll on Ted Cruz’s campaign]

The Islamic State terrorist group asserted responsibility for the attacks in Brussels, which killed at least 31 people and left hundreds of others injured.

In their responses to the attacks, the Republican presidential candidates portrayed Obama’s efforts to fight terrorism as feeble. They also assailed him over his trip to Cuba and his attendance at an exhibition baseball game there.

“Had I been president, I would have cut short my visit, I would have flown home, I would have conducted calls jointly with heads of state,” Kasich said.

But there was also infighting among the Republicans, each eager to show that he would make the best commander in chief.

“I have proven to be far more correct about terrorism than anybody — and it’s not even close. Hopefully AZ and UT will be voting for me today!” Trump wrote in a tweet, citing the two states holding Republican nominating contests Tuesday.

Cruz tried to draw a contrast with Trump, who told The Washington Post editorial board this week that he favored a reduced role for the United States in the North Atlantic Treaty Organization.

Cruz characterized those remarks as calling for a withdrawal and said that instead, “NATO should join with the United States in utterly destroying ISIS.”

[Trump questions need for NATO, outlines noninterventionist foreign policy]

Clinton was also eager to demonstrate her readiness on the world stage. The former secretary of state announced plans to deliver a counterterrorism speech at Stanford University on Wednesday.

“In the aftermath of the terrorist attack in Brussels, Clinton will highlight how now is a time for steady leadership when we must stand in solidarity with our European allies and respond firmly to defeat ISIS,” her campaign said in a news release.

Sanders said that while the United States has made progress in its fight against the Islamic State, it hasn’t been enough. “We are making progress in Iraq,” he said. “ISIS is losing 20 percent of the territory it held last year, but clearly we’ve got to do more. We need to forge a coalition of the Muslim countries in the region, including some that have not been as active as they should be, with the support of the United States and other major powers to finally destroy this barbaric organization.”

Ibrahim Hooper, a spokesman for the Council on American-Islamic Relations, said Cruz’s call for patrolling “Muslim neighborhoods” should be out of bounds for a White House hopeful.

“It’s really beyond belief that you have one of the leading presidential candidates calling for law enforcement to target religious communities totally based on the fact that they are of a particular faith,” Hooper said. “In normal times, this would be the sort of thing that would disqualify someone from running for dogcatcher, much less president of the United States.”

Adam Goldman in Washington, John Wagner in Flagstaff, Ariz., and David Weigel in Milwaukee contributed to this report.