Democratic presidential nominee Hillary Clinton addressed the media on Sept. 19, saying she is in touch with state and local officials in New York and Minnesota in the wake of weekend attacks. (The Washington Post)

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. She 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 said current anti-terrorism efforts are insufficient at home and abroad. He blamed President Obama and Clinton, who served as Obama’s first secretary of state, and he suggested that profiling is necessary to counter the threat.

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

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 Minnesota have refocused the presidential race on concerns about domestic terrorism and national security. With the nation rattled Monday in the wake of the three attacks, both candidates made the case for why they are better prepared than the other to step into the Oval Office.

Democratic presidential nominee Hillary Clinton said during a Sept. 19 news conference that preventing radicalization is a key part of the war on terrorism. (The Washington Post)

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

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

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

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

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

In a second interview with Fox News that aired Monday night, Trump said “we have to profile,” but skirted specifics about what his proposal would look like in practice.

“I’m saying you’re going to profile people that maybe look suspicious. I didn’t say they were Muslims or not,” said Trump, whose campaign website still includes the ban on Muslims entering the country that he proposed last year.

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

At a campaign rally in Estero, Fla., Monday afternoon, Trump took sharp and repeated aim at Clinton, accusing her of embracing plans on immigration and refugees that are too lax. He blamed the attacks over the weekend in part on immigration laws he cast as too weak and linked them to radical Islam.

Authorities have not confirmed any connection between the suspects and terrorist groups, although a news agency linked to the Islamic State claimed that the Minnesota attacker was “a soldier of the Islamic State.”

“There have been Islamic terrorist attacks in Minnesota and New York City and in New Jersey,” Trump said. “These attacks and many others were made possible because of our extremely open immigration system, which fails to properly vet and screen the individuals or families coming into our country.”

Trump also said the authorities should use “whatever lawful methods are available to obtain information” from the suspect. He called on Congress to pass measures ensuring foreign enemy combatants are “treated as such.” He has in the past voiced support for bringing back waterboarding as an interrogation tactic.

Trump later added that Clinton “talks tougher about my supporters than she does about Islamic terrorists,” citing her controversial statement earlier this month that half of his backers come from a “basket of deplorables.” Clinton has said she regrets classifying “half” of Trump’s supporters that way.

The Republican nominee also lamented that the suspected New York and New Jersey bomber — a U.S. citizen — is likely to receive modern medical treatment and access to a lawyer.

“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,” Trump said. “And on top of all of that, he will be represented by an outstanding lawyer. His case will go through the various court systems for years. And in the end, people will forget and his punishment will not be what it once would have been. What a sad situation.”

Later Monday, Clinton met with Egyptian President Abdel Fatah al-Sissi in New York for talks that were likely to include discussion of terrorism and prospects for peace in the Middle East. Trump also met with him, “focusing on political, military and economic cooperation between the two countries,” according to his campaign. Sissi, a former military chief who seized power in the 2013 toppling of Mohamed 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 Crimea 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 Trump and Russian President Vladimir Putin, the autocratic leader for whom Clinton has accused Trump of having a dangerous affinity. (During an episode of NBC’s “The Tonight Show” that aired Monday, Clinton referred to their relationship as “the most famous bro-mance going.”) Ukraine said it also invited Trump to meet Poroshenko in New York.

Clinton, who also served as a U.S. senator from New York, quickly pointed to her experience, in a direct contrast to that of Trump, the New York businessman who has never held elective 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.

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 in 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.”

Republicans have recently had an edge in voter trust when it comes to dealing with terrorism. But recent Washington Post-ABC News polls find that Clinton holds a three-point edge over Trump among registered voters on handling terrorism and a 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.

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

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 to buoy the third-party runs of libertarian Gary Johnson and Green Party candidate Jill Stein. Her schedule also included an afternoon fundraiser in Philadelphia that guests paid a minimum of $10,000 to attend.

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 her Philadelphia speech.

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 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 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,” Trump said. “I should be a newscaster, because I called it before the news.”

“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. Wagner reported from White Plains, N.Y. Emily Guskin in Washington contributed to this report.