Tuesday’s deadly terrorist attack in Brussels forces the presidential campaign to take yet another sharp turn toward the issue of national security. If early reactions are an indication, it’s a detour that benefits each party’s front-runner.

Not unlike the aftermath of November’s attacks in Paris, Hillary Clinton and Donald Trump offered strikingly different but mutually confident responses to the latest international tragedy, staking out ground that will help them win their primaries while keeping an eye on the general election. Neither candidate can be assured of avoiding blowback — which is especially true of the bombastic Trump — but both found their candidacies on firmer ground when the day ended Tuesday than when it began.

“These terrorists seek to undermine the democratic values that are the foundation of our alliance and our way of life, but they will never succeed,” Clinton said in a statement. “Today’s attacks will only strengthen our resolve to stand together as allies and defeat terrorism and radical jihadism around the world.”

Clinton has previously used the shift in focus to foreign policy to demonstrate her own breadth of experience on the topic, accrued during her time as President Barack Obama’s first secretary of state. Her comfort with the topic has shined, particularly when matched up against her Democratic primary rival, Sen. Bernie Sanders of Vermont — whose message of economic populism has felt one note in the face of questions about foreign policy.

“This election is not only about electing a president,” she said during the November debate. “It's also about choosing our next commander in chief.”

Clinton’s tenure in the Obama administration is less likely to be an asset in the general election. Since the cycle began, Republican strategists have hoped that the re-emergence of foreign policy as a top issue will give the GOP nominee a leg up with voters. Only 42 percent of voters approve of the way Obama handles foreign policy, according to a New York Times/CBS News poll released this week.

The rest of the field

The terrain is less clear for the three men who find themselves trailing the front-runners: the Democrat Sanders and the Republicans, Ohio Gov. John Kasich and Sen. Ted Cruz. Of the trio, the senator from Texas had the most notable response, saying that police officers should be allowed to monitor Muslim communities in America to ensure they don’t radicalize.

"We need to empower law enforcement to patrol and secure Muslim neighborhoods before they become radicalized," Cruz said.

It’s a response that calls to mind Trump’s proposed ban on Muslim immigration late last year, a move that drew significant backlash in the media but — in the end — proved popular with Republican voters. In exit polls of the New Hampshire primary in February, for instance, two-thirds of GOP voters said they supported the plan.

Cruz, however, doesn’t have Trump’s concentrated base of blue-collar workers. He’s instead trying to convince the Republican establishment and center-right voters that he’s a viable alternative to the man many feel is a general election liability. An issue like this might not help Cruz's cause.

“This is a smarter move if he’s doing … doing it to run as Trump’s running-mate, because what he’s doing is playing follow-the-leader,” said John Brabender, who was a senior adviser on Rick Santorum’s campaign for president. “I don’t think he’s really differentiating himself. You’re not going to one-up Trump on this.”

If anything, Brabender added, Cruz’s comments will likely drive support to Kasich.

How it helps Trump

Trump’s response to the attacks, coupled with his proposal Monday that the United States reduce its commitment to NATO, yet again exposed the deep differences him and the Republican Party’s foreign policy establishment. But that gap is unlikely to affect his unwavering coalition of supporters — in fact, according to Republican strategists, it might strengthen his connection to them.

Even attacks from Kasich and Cruz might play into Trump’s hands. In the immediate aftermath of Brussels attacks, both of them pounced on the front-runner’s NATO comments.

“Donald Trump's proposal to withdraw from the world, to withdraw from NATO, to withdraw from Europe is sadly consistent with his statement that he intends to be neutral between Israel and the Palestinians,” Cruz said.

That might be an ill-advised approach, said Wes Anderson, a veteran GOP pollster who advised Bobby Jindal’s presidential campaign. After the attacks, Anderson noted, Trump reiterated his calls to close the country’s borders — a proposal that has far more resonance with grassroots Republicans than the machinations of a far-away military alliance few are well-versed in.

Anderson said the situation is analogous to a burning house, in which the border-focused Trump shows up with a fire truck to put out the blaze. NATO critics, meanwhile, appeared at the burning house only to make sure the fire hydrants were in good working condition.

“To a whole huge swath of voters, the argument about whether Washington should be rallying to NATO or closing our borders is a silly argument,” he said. “It isn’t that they’re anti-NATO, it’s just they believe it has nothing to do with what’s going on right now. [Closing the borders] sounds like perfect common sense to a lot of voters.”

In a time of uncertainty over national security, voters often look for the candidate they perceive to be the toughest — regardless of his specific views on foreign policy. In this case, Trump’s vows to waterboard terrorists and, if necessary, kill their families has worked to convince many of them that he is just that — the toughest candidate.

“If a wolf is at the door, the strongest guy benefits from that,” said Anderson. “So I think [this] probably only makes him stronger.”

Niels Lesniewski contributed to this storyGet breaking news alerts and more from Roll Call on your iPhone.