PHILADELPHIA (Reuters) - Democrat Hillary Clinton on Monday accused Republican Donald Trump of aiding Islamic State recruitment, while Trump said she had helped weaken national security as bomb blasts in New York and New Jersey resonated on the U.S. presidential trail.

Both candidates for the Nov. 8 election tried to use the weekend attacks to flex their credentials to protect America as world leaders gathered in security-heightened New York for the annual United Nations General Assembly.

Clinton said Trump’s rhetoric against what he calls “radical Islamic terrorism” was helping Islamic State recruit more fighters.

“We know that a lot of the rhetoric we’ve heard from Donald Trump has been seized on by terrorists, in particular ISIS, because they are looking to make this into a war against Islam rather than a war against jihadists,” she told reporters in White Plains, New York. ISIS is an acronym used for Islamic State.

Trump fired back by saying Clinton bore some responsibility for the violence by not persuading President Barack Obama to leave a residual force of U.S. troops in Iraq when she was his secretary of state from 2009 to 2013.

Obama and the Iraqi government failed to reach agreement at the end of 2011 on extending a U.S.-Iraqi status of forces agreement, and most American troops were withdrawn.

Trump has sought to tie Clinton to the decisions of the Obama administration.

“Her attacks on me are all meant to deflect from her record of unleashing this monster,” Trump told a large crowd in Fort Myers, Florida.

The campaigns weighed in after the bomb incidents and a stabbing attack at a mall in central Minnesota.

U.S. Democratic presidential candidate Hillary Clinton speaks to the media before boarding her campaign plane at the Westchester County airport in White Plains, New York, U.S. September 19, 2016. REUTERS/Carlos Barria

In the most serious incident, a bomb went off in New York City’s Chelsea neighborhood on Saturday, injuring 29 people. An unexploded pressure-cooker bomb was found nearby. Earlier that day, a pipe bomb went off in Seaside Park, New Jersey.

On Monday, an Afghanistan-born American suspected in some of the incidents was arrested in nearby Linden, New Jersey, after a gunbattle with police. Authorities had said earlier they wanted to question Ahmad Khan Rahami, a 28-year-old naturalized U.S. citizen, about the Chelsea and Seaside Park bombings.

The incidents, just days after the 15th anniversary of the Sept. 11, 2001, attacks, put the United States’ most populous city on edge.

Trump, who has in the past talked of the need for a resumption of harsh interrogation tactics like waterboarding for terrorism suspects, said authorities need to “get information” from the bombing suspect “before it comes no longer timely,” but that instead he would probably be coddled.

“Now we will give him amazing hospitalization. He will be taken care of by some of the best doctors in the world. He will be given a fully modern and updated hospital room. And he’ll probably even have room service knowing the way our country is,” he said.

‘COMMANDER IN CHIEF TEST’

At a speech in Philadelphia on Monday, Clinton called for vigilance.

“This is a fast-moving situation and a sobering reminder that we need steady leadership in a dangerous world,” she said.

Trump seized on a government report that said 858 immigrants from countries with which the United States has national security concerns who were pegged for deportation were mistakenly granted citizenship. He said the report showed the need for tighter control over who gets into the United States.

“Immigration security is national security,” Trump said in Fort Myers.

Peter Feaver, a political science professor at Duke University who worked on the National Security Council under Republican President George W. Bush, said Clinton was trying to argue Trump did not pass the commander in chief test.

“When bad news happens, she wants to be able to say, this is why you need a steady hand on the tiller,” Feaver said.

The renewed focus on terrorism came as Clinton and Trump prepared for their first debate next Monday at Hofstra University in Hempstead, New York, east of the city.

With world leaders gathered in New York for the U.N. conclave, Clinton was expected to meet leaders of Japan, Egypt and Ukraine later on Monday, while Trump was expected to meet Egyptian President Abdel Fattah al-Sisi.

A U.S.-led coalition has been fighting Islamic State mainly through air strikes in Syria and Iraq.

Trump, who has based much of his campaign message on arguing that the United States is no longer safe and that he alone can protect the nation, told Fox News on Monday morning that he expected more attacks.

“I think this is something that maybe will ... happen more and more all over the country,” he said.