Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

A majority of Americans, both Republicans and Democrats, view North Korea as the most immediate threat to the United States, according to a new NBC News|SurveyMonkey poll.

The majority opinion represents a shift since July, when 41 percent of Americans said North Korea was the greatest immediate threat and 28 percent cited ISIS.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

But now, Americans across party lines agree that North Korea poses the most significant threat. A majority of Republicans (53 percent) and Republican-leaners, independents (53 percent) and Democrats and Democratic-leaners (55 percent) agree.

A larger share of Americans also say they desire a diplomatic rather than military resolution when it comes to North Korea, according to the new poll, which was conducted online from October 13 through October 17.

Earlier this month, Secretary of State Rex Tillerson indicated that the United States has "lines of communication" with North Korea. But President Donald Trump tweeted shortly thereafter that Tillerson is "wasting him time trying to negotiate with Little Rocket Man."

Americans, however, are even more decided about their desired path to resolution, with a 64 percent majority saying the U.S. should mostly use diplomacy when dealing with North Korea — up 5 points since July.

Though Republicans are split on whether they think the U.S. should use military action or diplomacy, they have moved slightly more toward diplomacy since July as well, from 42 percent to 46 percent. Eight in 10 Democrats favor diplomacy, up from 76 percent in July. A six in 10 majority of independents still favor diplomacy.

Overall, a majority of Americans (56 percent) also disapprove of the way Trump is handling the situation with North Korea, with differences across party lines.

The NBC News|SurveyMonkey National Security poll was conducted from October 13 through October 17, 2017, among a national sample of 5,047 adults. Respondents for this non-probability survey were selected from the nearly 3 million people who take surveys on the SurveyMonkey platform each day. Results have an error estimate of plus or minus 2.0 percentage points. For full results and methodology, click here.