NEW YORK — Democratic presidential nominee Hillary Clinton warned Monday that anti-Muslim rhetoric by opponent Donald Trump is “giving aid and comfort” to the Islamic State, as both candidates sought to position themselves as better qualified to combat terrorism in the aftermath of a spate of violence over the weekend.

“We know that a lot of the rhetoric that we’ve heard from Donald Trump has been seized on by terrorists, including ISIS, because they are looking to make this a war against Islam,” Clinton said, using an acronym for the Islamic State. Clinton insisted that the United States is up to the challenge of combating terrorism on its shores, and that only she has a detailed plan to meet that challenge.

Trump, meanwhile, said current anti-terrorism efforts are insufficient at home and abroad. He blamed President Barack Obama and Clinton, who served as Obama’s first secretary of state, and he suggested that racial profiling might be necessary to fully combat the threat.

“We have to lead for a change. Because we’re not knocking them, we’re hitting them once in awhile, we’re hitting them in certain places. We’re being very gentle about it. We’re going to have to be very tough,” Trump told Fox News Channel.

A week before Clinton and Trump are scheduled to face off in their first televised debate, bombings in New York and New Jersey and a mass stabbing in Minneapolis have refocused the presidential race on concerns about domestic terrorism and national security. Both candidates addressed a rattled nation Monday in the wake of the three attacks, making the case for why each is better prepared to step into the Oval Office.

The two candidates’ responses aptly reflected what each sees as a winning argument – an appeal to steady leadership and presidential bearing for her and a get-tough message for him.

At an airport news conference with her campaign plane as backdrop, Clinton stood somberly at a lecturn and repeatedly sought to reassure Americans to go about their lives, to not be deterred by fears of terrorism and to rest assured that the U.S. is well-positioned to combat the threat at home and abroad.

And in his interview, Trump said that the United States is too tentative in its efforts against terrorism overseas. The better approach would be to “knock the hell out of ’em” and possibly introduce profiling as a counterterrorism tactic, he added.

Trump’s promises to crack down on terrorists abroad and tighten immigration to better protect the United States have played well despite voter unease with some of his policies, including on treatment of Muslims.

“Our local police, they know who a lot of these people are. They are afraid to do anything about it because they don’t want to be accused of, uh, profiling. And they don’t want to be accused of all sorts of things,” Trump said in the Fox interview.

He concluded: “Do we have a choice? Look what’s going on. Do we really have a choice? We’re tying to be so politically correct in our country.”

It’s not the first time Trump has suggested that profiling could be an effective tactic.

The Republican presidential nominee went on to praise Israel’s policing practices. Israeli security forces routinely conduct general roundups for questioning or during specific investigations.

“You know in Israel, they profile,” Trump said. “They’ve done an unbelievable job – as good as you can do. But Israel has done an unbelievable job. And they’ll profile. They profile. They see somebody that’s suspicious. They will profile. They will take that person in. They will check out.”

Later Monday, Both Trump and Clinton were scheduled to meet Egyptian President Abdel-Fattah el-Sissi in New York for talks likely to include discussion of terrorism and prospects for Middle East peace.

Sissi, a former military chief who seized power in the 2013 toppling of Mohammed Morsi, Egypt’s Muslim Brotherhood-backed president, is in the United States for the annual U.N. General Assembly.

In addition, Clinton planned to use the gathering of world leaders to hold a session with Ukraine’s leader Monday. Ukraine and Russia are at odds, and skirmishing nearly daily, over Russia’s annexation of the Crimea region two years ago. Clinton’s meeting with Petro Poroshenko, which Ukrainian officials said was at the country’s invitation, is a finger in the eye of both Trump and Russian President Vladimir Putin, the autocratic leader for whom Clinton has accused Trump of having a dangerous affinity. Ukraine said it also invited Trump to meet Poroshenko in New York.

Clinton accused Trump, who has singled out Muslims for proposed new immigration restrictions, of playing into the hands of Islamic State radicals who want to cast their fight with the United States and Western influences as a religious war.

“They want to use that to recruit more fighters to their cause by turning it into a religious conflict,” Clinton said, adding that the right approach is to go after “the bad guys” but not their religion.

Her comments came while a manhunt was underway for Ahmad Khan Rahami, 28, a naturalized U.S. citizen born in Afghanistan who is a suspect in connection with bombings Saturday in Manhattan and Seaside Park, N.J. He was taken into custody several hours after his name was made public.

“This threat is real, but so is our resolve. Americans will not cower. We will prevail,” Clinton said. “We will defend our country, and we will defeat the evil, twisted ideology of the terrorists.”

Clinton, who also served as a U.S. senator from New York, quickly pointed to her own experience as a direct contrast to Trump. The New York businessman has never held elected office. Clinton sought to reassure Americans that law enforcement and other authorities are up to the task – a clear message to voters worried about how the next administration will confront security challenges.

Republicans have recently had an edge in voter trust to deal with terrorism. But recent Post-ABC polls find Clinton holds a narrow, three-point edge over Trump among registered voters on trust to handle terrorism, and a wider 24-point lead on handling an international crisis.

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

She added that she had laid out “a comprehensive plan to meet the evolving nature of this threat and take the fight to ISIS everywhere they threaten us, including online.”

Trump, she insisted, has no real plan.

Trump offered a vague strategy for combating the Islamic State and other terrorists overseas, saying we have to “knock the hell out of ’em.” He repeated his criticism of Obama and Clinton, blaming them for allowing too many Syrian refugees into the country.

The discussion focused heavily on the bombings in New York and New Jersey and stabbing in a Minnesota mall. A news agency linked to the Islamic State claimed that the Minnesota attacker was “a soldier of the Islamic State.”

“Maybe we’re going to be seeing a big change over the last couple of days. I think this is something that maybe will get, you know, will happen perhaps more and more over the country,” Trump warned.

Clinton spoke at a hastily called news conference as she was headed to Philadelphia for a speech aimed at young voters, many of whom are cool toward her candidacy and are helping buoy the third-party run of libertarian Gary Johnson and Green party candidate Jill Stein.

The events of the past few days are “a sobering reminder that we need steady leadership in a dangerous world,” she said at the start of that address.

The emphasis on steadiness and calm, as well as experience, has been Clinton’s main national security argument in a year in which voters have sought outsider candidates and a message of change. She is constrained somewhat by the imperatives to defend Obama’s foreign policy as his designated successor and not alarm liberal Democrats still suspicious of her reputation as a hawk.

In touting her credentials, Clinton also pointed to the endorsements she has received from Republican national security leaders, who have voiced grave concerns about the prospect of Trump as commander in chief.

On Saturday night, as initial reports about an explosion in Manhattan were still coming in, and before the authorities had announced the details, Trump told supporters at a rally that a “bomb” had gone off in New York. On Monday, he bragged about his choice of words.

“What I said is exactly correct. I should be a newscaster because I called it before the news,” Trump said.

“I must tell you that just before I got off the plane, a bomb went off in New York and nobody knows exactly what’s going on,” Trump said shortly after he left his plane at a rally in Colorado Springs on Saturday night.

Law enforcement officials said they are investigating whether Rahami could have been influenced by international militant groups or the ongoing conflict in his homeland.

Sullivan reported from Washington and Wagner reported from White Plains, N.Y. The Washington Post’s Emily Guskin in Washington also contributed to this report.