Donald Trump seized on the weekend attacks in New York, New Jersey, and Minnesota to promote his anti-immigration proposals as a national security agenda and return his campaign to the familiar terrain of terrorism a week before the first presidential debate.

“Immigration security is national security,” Trump said during a rally in Fort Myers, Fla., on Monday.

The GOP nominee believes the politics surrounding terrorism and insecurity play beyond his core base and work in his favor, just 50 days out from the election. Trump added the weekend blasts to a years-long terrorism timeline he recites at rallies. “One brutal attack after another,” he said in Florida.

With the focus of the campaign shifting in the wake of the attacks, and coinciding with foreign leaders arriving in New York City for the United Nations General Assembly meeting, Hillary Clinton moved to stake her claim on the debate, hoping to draw a sharp contrast between herself and Trump on experience and temperament in a precarious time.

Trump referred to Clinton Monday as “weak and ineffective” when she served as secretary of state and accused her and President Obama of backing policies that gave rise to ISIS, while Clinton accused her opponent of “irresponsible, reckless rhetoric.”

Both candidates accused one another of being a boon to terrorists, if elected. “They want her so badly,” Trump said of ISIS and Clinton. The Democratic nominee said Trump’s rhetoric has drawn the attention of ISIS recruiters “looking to make this into a war against Islam rather than a war against jihadists, violent terrorists," she said, noting her discussions 10 days ago with a group of national security experts from both parties.

Trump has responded to attacks at home and abroad by drawing a connection to U.S. immigration laws and arguing that the Obama administration and Clinton-backed domestic and foreign policies have “emboldened” terrorists. On Monday, Trump blamed political correctness as he renewed calls for racial profiling and the implementation of an “extreme” system to vet immigrants from countries with known terrorist activity.

“These attacks, and many others, were made possible because of our extremely open immigration system,” he said. His speech in Fort Myers came after police apprehended bombing suspect Ahmad Khan Rahami, a 28-year-old from Elizabeth, N.J., a naturalized citizen who was born in Afghanistan and came to the United States as a child.

Trump has allowed little nuance when linking terrorism to immigration, even when the attackers are American born or naturalized. Trump advocated again on Monday for ideological vetting of immigrants and refugees, even as he acknowledged last week that it is difficult to accurately assess what is in a person’s heart. He also seized on a new report that the administration mistakenly granted citizenship to more than 800 illegal immigrants who were slated for deportation.

The turn to terrorism injects another bout of uncertainty to a presidential race that has become increasingly competitive. Recent polling shows Americans torn on whether Trump or Clinton is best equipped to handle terrorism. An NBC/Wall Street Journal poll taken in early August found the candidates tied on the issue. A Fox News poll released last week found Clinton with just a one-point edge on handling national security and terrorism.

While Trump has come under fire for his responses to terrorist activity -- taking credit for defining the attack or calling for religious bans -- his tone and approach resonates with his supporters. The GOP nominee has signaled he believes he has an advantage on this issue. After landing in Colorado Saturday night, Trump immediately told his audience “a bomb went off” in New York. During an interview with “Fox and Friends” on Monday morning, Trump dismissed criticisms that he reacted before authorities confirmed the nature of the explosion. “I should be a newscaster because I called it before the news,” he said.

Also during the interview, Trump criticized Clinton for ruling out combat troops in the region, arguing that the president shouldn’t reveal strategy to the enemy.

Clinton urged voters Monday to reject what she called Trump’s divisive rhetoric, his vacuum when it comes to experience, and his “secret” plan to defeat ISIS, which she hinted was nonexistent.

Clinton defended a plan she has outlined for the last year to defeat ISIS in Iraq and Syria, relying on an alliance of international partners attacking Islamic State fighters from the air, and intelligence sharing to cut off fighters’ supply lines when it comes to funding, weapons and new recruits.

Clinton said if elected president, she would invest more “time and resources” to combating so-called lone wolf ISIS sympathizers, who are identified, targeted and recruited by terrorists abroad to commit violent acts in the West.

Following the lead the Obama administration, Clinton said she wants private-sector technical experts in Silicon Valley to assist the government “not only to take down terrorist propaganda, but to do everything we can to intercept and prevent radicalization and recruitment.”

She was not more specific in her Monday remarks, but referred to her “comprehensive” plan. A similar effort has been underway within the Obama administration for more than a year, modified after admissions this year by administration officials that U.S. government efforts to battle ISIS recruitment skills on social media had failed.

Commenting on Trump’s criticism of her immigration policies and his call for vetting of migrants to screen for their ideology and affection for the United States, Clinton said she had “long been an advocate for tough vetting” and a “better” visa system. But she said Trump’s approach to defeating terrorism through border enforcement and immigration screening missed the mark.

Clinton was careful while speaking Monday morning not to draw conclusions about suspects and the early evidence still coming together in New York and New Jersey with help from local law enforcement and the FBI.

“Let’s remember what happened on 9/11,” she said. “These were not refugees who got into airplanes and attacked our city and our country. So let’s not get diverted and distracted by the kind of campaign rhetoric we hear coming from the other side.”

Although Trump sought to blame Clinton for the rise of ISIS, the Democratic nominee used her experience as a shield and a political weapon.

Clinton contrasted her knowledge and past decision-making alongside that of businessman Trump, noting her years as a former New York senator and then secretary of state. Those roles, she argued, informed her understanding of intelligence gathering and complex efforts by the United States, working with allies, to defeat ISIS as well as terrorists worldwide. She again called for what she termed an “intelligence surge” to try to identify and stop terror attacks before they can occur.

“I’m the only candidate in this race who has been part of the hard decisions to take terrorists off the battlefield,” Clinton said.

Caitlin Huey-Burns is a national political reporter for RealClearPolitics. She can be reached at chueyburns@realclearpolitics.com. Follow her on Twitter @CHueyBurnsRCP.