Hillary Clinton accused Donald Trump of giving "aid and comfort" to Islamic terrorists, declaring his anti-Muslim rhetoric helps the Islamic State group and other militants such as ISIS recruit new fighters.
But Trump hit back, saying his Democratic rival and the Obama administration hadn't done enough to quell the group's rise.
"Her attacks on me are all meant to deflect from her record of unleashing this monster of evil on us and on the world," said Trump at a packed Florida rally, referring to Clinton's tenure as secretary of state.
He also insisted the US should "use whatever lawful methods are available" to get information from the Afghan immigrant arrested in this weekend's bombings.
As several Trump supporters shouted "Hang him!" the Republican presidential candidate bemoaned the fact that Ahmad Khan Rahami, a 28-year-old US citizen originally from Afghanistan, would receive quality medical care and legal representation.
"We must deliver a just and very harsh punishment to these people," he said. "These are enemies, these are combatants and we have to be tough, we have to be strong." Both candidates moved swiftly to capitalize on investigations into a weekend of violent attacks bombings in New York and New Jersey and stabbings at a Minnesota mall casting themselves as most qualified to combat terrorism at home and abroad.
Clinton touted her national security credentials at a hastily arranged news conference outside her campaign plane, accusing Trump of using the incidents to make "some kind of demagogic point."
"I'm the only candidate in this race who's been part of the hard decisions to take terrorists off the battlefield," Clinton, a former secretary of state, told reporters. "I know how to do this."
The possibility of a home-grown terrorist plot cast a new shadow over the presidential race, diverting both candidates' attention from the daily controversies of the campaign and giving them a high-profile opportunity to make their case to undecided voters.