“I think it’s the biggest, I personally think it’s the biggest problem the world has, nuclear capability,” he added. He then turned the subject to climate change.

Yet in a March interview on MSNBC, Mr. Trump asked. “Somebody hits us within ISIS, you wouldn’t fight back with a nuke?” He added, “I would never take any of my cards off the table.”

Mrs. Clinton has herself taken hawkish positions in the past. During her bid for the presidential nomination in 2007, she refused to exclude the possible use of nuclear arms against terrorists. Mr. Obama had ruled out such a step against Osama bin Laden, then in hiding.

Mrs. Clinton portrayed herself then as the more experienced candidate. Presidents, she declared, “should be careful at all times in discussing the use and nonuse of nuclear weapons,” adding that she would not address hypothetical questions.

“Presidents since the Cold War have used nuclear deterrents to keep the peace,” she said, “and I don’t believe any president should make blanket statements with the regard to use or nonuse.”

But just a year earlier — before running against Mr. Obama — she seemed to have a different view. Asked about how the Bush administration should try to confront the Iranian nuclear program, she said: “I would certainly take nuclear weapons off the table. This administration has been very willing to talk about using nuclear weapons in a way we haven’t seen since the dawn of a nuclear age. I think that’s a terrible mistake.”

This issue of nuclear arms does not rank at the top of voter concerns, but polls suggest the advantage on this issue is shifting in Mrs. Clinton’s favor. This week, a Fox News poll found that voters had more faith in her ability to handle decisions on nuclear weapons than Mr. Trump, 56 percent to 34 percent. In mid-May, when Fox News first asked the question, the margin in Mrs. Clinton’s favor was half as large.