The recent connected bombings in New York and New Jersey and the stabbing attack at a mall in Minnesota have increased interest in how the presidential candidates would handle national security.

Hillary Clinton and Donald Trump have spoken out since the attacks, which left dozens of people injured.

John Cohen, a former counterterrorism coordinator for the Department of Homeland Security, said he believes that the terrorist attacks that have occurred during the campaign "have a significant impact" on voters.

"When events occur like this ... you tend to have people become more fearful, and when people are more fearful, they tend to gravitate towards a candidate who appears to be more strong," said Cohen, who currently works as an ABC News consultant.

Three of the latest national polls — all conducted before the attacks this weekend — had Clinton leading when respondents were asked whom they trust to handle the issue of terrorism.

In an ABC News/Washington Post poll released Sept. 11, Clinton led, 50 percent to Trump's 41 percent among all adults and 48 percent to Trump's 45 percent among likely voters when asked about who was more trusted to handle terrorism.

A CBS/New York Times poll released Sept. 14 had Clinton doing "a better job handling terrorism and national security" according to 49 percent of respondents, compared with Trump's 45 percent.

The split was closest in a Quinnipiac poll released Sept. 15, in which respondents were asked who they thought would do a better job keeping the country safe from terrorism, "regardless of how you intend to vote." In that poll, Clinton got 49 percent to Trump's 47 percent.

"Traditionally, it's been the Republican Party who has projected strength and awareness in the area of law enforcement and homeland security, but today that's kind of flipped because, despite his rhetoric, there are a number of national security experts who have raised concerns about the level of understanding that Donald Trump has as it relates to terrorism and national security threats," Cohen said.

Andres Kudacki/AP Photo

Current events are factoring into the political campaigns, with the candidates scheduling speeches about national security in the wake of attacks. But Cohen said political rhetoric could also be affecting and even motivating the attacks themselves.

He said Trump's rhetoric and calls to bar foreign Muslims from entering the United States "may even serve to further along those who are becoming inspired to act on [ISIS'] behalf."

James Campbell, a professor of political science at the University at Buffalo in New York who has written a book about political polarization, told ABC News that he believes the attacks translate to a potential advantage for Trump.

"I have to think that terrorist events in this country help Trump and hurt Clinton. For these events to be occurring with the frequency they do may be read by many as a failure of the current administration and particularly its foreign policy team to effectively deal with the problem," he said.

"It may also suggest that we need a tougher approach to dealing with terrorism, an approach associated with Trump. When suspects are identified who have Muslim-sounding names, then that may further fuel support for tougher immigration standards and scrutiny," Campbell added.