When President Trump touches down in South Korea on Tuesday, he will face the complicated task of balancing the need to send stern warnings north to Pyongyang while reassuring its southern neighbor that the U.S. remains committed to protecting Seoul from the “fire and fury” he has threatened to unleash to keep North Korea in check.

It’s a tightrope that would prove difficult for even the most nimble leader to walk. The war of words between Trump and North Korea’s Kim Jong Un has devolved into name-calling and bellicose warnings in recent months as the North Koreans race to develop a nuclear weapon capable of striking the U.S. mainland.

But Trump’s confrontational rhetoric has also put Seoul on edge amid fears that the two leaders’ pugnacity could lead one or the other to make a miscalculation that sparks a military conflict.

“I think what Trump needs to do more than anything else is that he needs to reassure the South Koreans on multiple levels,” said Harry Kazianis, director of defense studies at the Center for the National Interest.

Some of those reassurances should include walking back his campaign-era attacks on South Korea’s trade deficits and military burden-sharing, Kazianis noted. And Trump should dedicate some time to reassuring South Korean President Moon Jae-in that the U.S. will work to avoid a military clash that would leave thousands of South Koreans dead.

“Diplomats I’ve spoken to here in Washington and in Seoul, they were concerned. They had never heard any rhetoric like that before coming out of a U.S. administration,” Kazianis said of Trump’s threats to rain down “fire and fury” on North Korea if Kim Jong Un continued threatening America. “I don’t think they were horrified, but the language, to them, according to one diplomat I spoke with, said it sounded more like the language of Kim Jong Un than a U.S. president.”

Kazianis said South Korean leaders found Trump’s comments at the United Nations General Assembly more troubling, because Trump said at the time that the U.S. “will have no choice but to totally destroy North Korea” if Pyongyang provoked America or its allies.

“Any sort of talk like that always gets the South Koreans very nervous,” Kazianis said. “If there was ever a war between the U.S. and North Korea, the South Koreans are the ones who are going to take the brunt of the casualties.”

However, Trump is also expected to use his trip to South Korea to remind Pyongyang that the White House still sees any further attempts to develop a nuclear arsenal as unacceptable.

H.R. McMaster, Trump’s national security adviser, said last week that the president would “use whatever language he wants to” when discussing the North Korean threat during his five-country tour through Asia. McMaster also noted that one of the overarching priorities of the 12-day journey was to stress the importance of securing the “complete, verifiable and permanent denuclearization of the Korean peninsula."

And Trump has already begun to rattle his saber on North Korea during the early legs of his trip.

For example, during an appearance in Tokyo on Monday alongside Japanese Prime Minister Shinzo Abe, Trump warned the U.S. “will not stand” for threats from Pyongyang.

“Some people say my rhetoric is very strong, but look what has happened with very weak rhetoric in the last 25 years," Trump said in Japan just one day before heading to Seoul.

James Person, director of the Hyundai Motor-Korea Foundation Center for Korean History and Public Policy at Johns Hopkins University, said the brevity of Trump’s stay in South Korea relative to his stay in Japan could send a message to Seoul that his relationship with the South Koreans is “less important” than his relationship with other regional allies when it comes to dealing with North Korea.

“It’s just something that directly impacts the national security of South Korea, and yet we’ve seen Trump discuss North Korea issues on a much more regular basis with Japanese and Chinese leaders,” Person said.

Trump and Abe have enjoyed a close relationship since even before Inauguration Day. The Japanese prime minister was the first foreign leader to visit Trump after his election victory, and the two have developed a warm relationship that Kazianis described as a “good bromance.”

“I think it’s pretty clear that President Trump, for whatever reason, is very high on Shinzo Abe,” Kazianis said. “For whatever reason, he connects on a very personal level with Shinzo Abe.”

One of Trump’s most important tasks during his roughly 24-hour trip to South Korea, after spending two days in Japan ratcheting up the rhetorical pressure on North Korea, will be to reaffirm America’s commitment to defending its ally in the face of threats from Seoul’s northern neighbor, Person said.

“I think there are concerns about U.S. commitment and credibility” on the issue of its alliance with South Korea, Person said.

Trump’s first stop when he arrives in South Korea will be Camp Humphreys, an Army garrison south of Seoul where thousands of U.S. soldiers and their families are stationed.

The president is scheduled to have lunch with both U.S. and Korean forces at Camp Humphreys shortly after arriving from Japan.

“I hope that the trip to Camp Humphreys reinforces to President Trump the understanding that, not only will the South Korean people be exposed to risk, but also there are 28,500 U.S. troops and their families that would be within range, and so there’s a real cost there, a potential cost to this rhetoric, and again, there is a great chance of miscalculation,” Person said.

The White House had flirted with the possibility of sending Trump to the Demilitarized Zone, the 2.5-mile-wide strip of land that divides the Korean peninsula into two nations, but ultimately decided against the move in the weeks before unveiling Trump’s itinerary.

Vice President Mike Pence visited the DMZ during a tour of the region in April, and Defense Secretary Jim Mattis stopped by the zone when he traveled to South Korea last month.

Kazianis said the White House likely determined it had little to gain by also sending Trump to the North Korean border.

“This is a president who is still a novice when it comes to international affairs,” Kazianis said. “If he had said something wrong, I think that the downside risk for him would’ve been very high. He’s not going to go to South Korea and say, “Kim Jong Un, tear down this fence.’ The risks of him saying something inflammatory were, I think, a little too high.”

Trump will also face pressure during the parts of his Seoul visit that focus on North Korea to articulate his administration’s strategy for countering Pyongyang’s aggression.

Administration officials have in the past sent conflicting messages about how best to discourage North Korea’s nuclearization and what role diplomacy should play in disarming Pyongyang. For example, Trump warned Secretary of State Rex Tillerson last month to “stop wasting his time” pursuing diplomatic channels with the Kim regime after Tillerson revealed the existence of those lines of communication.

Kazianis said the “X-factor” that could scramble the White House’s preparations for such a complex visit is the risk that North Korea could test a missile while the president is physically in Seoul, a provocation that could serve as a direct challenge to the administration.

“If they did something like that while Trump was there and basically embarrassed him — and considering how much this man is into the optics of every situation — I think you’d have to keep in mind, at that point, all bets are off,” Kazianis said, noting the North Koreans had been testing a missile roughly every two weeks but had not done so in more than 40 days by the eve of Trump's visit.

“They would be risking Donald Trump’s real fire and fury.”