SEOUL, South Korea — He won the presidency promising a shift toward dialogue with North Korea. He argued that sanctions and pressure alone would never persuade the North to scrap its nuclear arsenal. And he pledged to “say no to the Americans if necessary.”

Now, as Mr. Moon prepares to host Mr. Trump’s first visit to South Korea, he finds himself caught in a bind, compelled by the White House and conservatives at home to support hard-line policies that he once criticized — and that many of his supporters worry are dragging their nation to the brink of war.

Mr. Moon’s engagement agenda has been thwarted as much by the North’s defiant weapons tests as Mr. Trump’s combative response. But South Korea is more accustomed to belligerence from Pyongyang than Washington, and there is widespread concern that Mr. Trump may make matters worse when he arrives next week.

Mr. Trump leaves Washington on Friday for a five-nation, 12-day trip across Asia during which he intends to intensify pressure on North Korea while also pushing for better trade deals for the United States. After a stop in Hawaii, he travels to Japan, then South Korea and China before ending the tour with regional summits in Vietnam and the Philippines.

Image

Mr. Moon met with President Trump at the White House in June.CreditPete Marovich for The New York Times

“What South Koreans fear the most is, what if Trump says something provocative, like a military option against North Korea,” said Koh Yu-hwan, a professor of North Korean studies at Dongguk University in Seoul. “Trump is unpredictable.”

Mira Rapp-Hooper, a scholar of Asian security issues at Yale Law School, said Mr. Moon has struggled to balance his agenda with “a Trump strategy that simultaneously aggravates North Korea and threatens the alliance relationship with South Korea.”

“Usually when you are in a heightened security situation, you would expect to see an alliance pull closer,” she said. “But it is very difficult to do in a world where Trump is threatening South Korea itself.”

There have been some signs of pushback by Mr. Moon. He reached a deal with China on Tuesday to end their dispute over the deployment of an American missile defense system, agreeing not to accept additional launchers from the United States. He later said he wanted to pursue “balanced diplomacy” with Washington and Beijing, which favors talks with North Korea.

And in a speech Wednesday, Mr. Moon repeated his position that military action against the North “shall not be taken” without South Korea’s consent, undermining the credibility of Mr. Trump’s threats.

During a visit by Defense Secretary Jim Mattis last week, South Korea also sought to take back operational control of its military forces in the event of a conflict, which would undo an agreement in place since the 1950s that puts its troops under United States command if fighting resumes.

Still, Mr. Moon appears to have concluded that South Korea has little choice but to stand by Mr. Trump and accept its status as the junior partner in the alliance — even though it would have the most to lose in a war.

“What we must realize, painfully, is that although this is a Korean Peninsula issue of greatest urgency for us, in reality, we have no power to resolve it,” Mr. Moon said on July 11 of the nuclear standoff. “We have no power to elicit an agreement.”

Scott Snyder, director of the program on United States-Korea policy at the Council on Foreign Relations, said that Mr. Moon has proved to be a pragmatist.

“And any South Korean pragmatist is going to look at options for achieving South Korea’s security needs, and immediately recognize that the U.S. security guarantee is central,” he said.

Some of Mr. Moon’s supporters have accused him of betraying his principles by deferring to Mr. Trump and what they consider a reckless approach to the North. The conservative opposition, meanwhile, has seized on any deviation to accuse Mr. Moon of endangering the alliance with the United States.

But Mr. Moon’s approval ratings remain high, with many South Koreans instead faulting Mr. Trump. The administration’s hints of a preventive strike on North Korea have unnerved them as much as, if not more than, the North’s weapons tests.

Many were shocked and furious in August when Senator Lindsey Graham quoted Mr. Trump minimizing the potential for casualties in a war by saying they would occur in South Korea, not the United States.

Small groups of anti-American activists have since taken to the streets in Seoul, shouting “No Trump, No War!” and calling him a “dotard,” a derogatory word for an old person that North Korea’s leader, Kim Jong-un, used to condemn Mr. Trump after he threatened to “totally destroy” the North in September.

Image

A South Korean soldier participating in a drill near the disputed sea border with North Korea in September.CreditSouth Korean Marine Corps/Yonhap, via Reuters

“South Koreans are frustrated that the United States has not allowed their country any wriggling room,” said Cho Han-bum, an analyst at the Korea Institute for National Unification. “Trump is helping spawn anti-American sentiment here.”

Mr. Moon is also juggling concerns about the security of the coming Winter Olympics, which South Korea will host three months from now in Pyeongchang, a town about 60 miles from the border with the North.

When the South last hosted the Olympics, in 1988, North Korea attempted to disrupt the event, most notably by detonating a bomb on a Korean Air passenger jet, killing 115 people, less than a year earlier. And in 2002, as South Korea hosted the World Cup soccer tournament, the North provoked a naval skirmish that left six South Korean sailors dead and an unknown number of North Korean casualties.

There is additional anxiety because joint military exercises conducted by South Korea and the United States are scheduled to begin during the Olympics. The North has condemned the annual drills as rehearsals for invasion, and often makes a point of responding with missile tests.

China has proposed suspending the exercises in exchange for a freeze in testing by North Korea, a proposal that both Mr. Moon’s government and the Trump administration have rejected.

When he meets with Mr. Trump, Mr. Moon is expected to discuss ways to ease tensions ahead of the Olympics. But South Korean officials said the exercises were unlikely to be scaled back or delayed, especially if North Korea continued its weapons tests.

Mr. Moon continues to argue that pressure alone will not persuade North Korea to give up its nuclear arms, and that the world must offer it carrots, including negotiations and, eventually, economic exchanges.

Image

Ribbons on a wire fence near the border with North Korea symbolizing people’s wishes for reunification of the two Koreas.CreditAhn Young-Joon/Associated Press

“There is so much weighing on him that I don’t think he has the political capital or ability to muster a strong coalition for sustained engagement” with North Korea, said Celeste Arrington, professor of international affairs at George Washington University. “That is currently kind of a pipe dream because the constraints are so great.”

By contrast, China’s president, Xi Jinping, and Prime Minister Shinzo Abe of Japan will host Mr. Trump next week after political victories at home. Mr. Abe recently won a commanding majority in parliamentary elections, while a Communist Party congress in Beijing elevated Mr. Xi to the same exalted status as Mao Zedong.

Mr. Abe has unequivocally supported Mr. Trump’s approach toward North Korea and argued that “dialogue will not work.”

North Korea has not conducted a missile test since Sept. 15, when it sailed an intermediate-range ballistic missile over Japan. It is unclear what is behind the lull, but South Korean officials hope to use it to reduce tensions — and build momentum for diplomacy during Mr. Trump’s marathon tour across Asia.

Mr. Trump plans to address South Korea’s legislature, the National Assembly — he would be the first American president to do so in nearly a quartercentury — and visit Pyeongtaek, south of Seoul and the host of Camp Humphreys, one of the largest American military bases.

The visit is intended in part to address Mr. Trump’s complaint that South Korea is not paying enough to support the American military presence.

“South Koreans hope that Mr. Trump’s visit will be an occasion to reconfirm the alliance and agree to a peaceful solution to the North Korean crisis,” said Yang Moo-jin, a professor at the University of North Korean Studies in Seoul. “The last thing they want is for him to come here and add instability.”

Choe Sang-Hun reported from Seoul, and Motoko Rich from Tokyo.

A version of this article appears in print on , on Page A1 of the New York edition with the headline: Trump Leaves New South Korean Leader in Bind. Order Reprints | Today’s Paper | Subscribe