Photo/IllutrationU.S. President Donald Trump, right, and South Korea's President Moon Jae-in attend a welcoming ceremony at the Presidential Blue House in Seoul on Nov. 7. (Pool Photo via AP)

SEOUL--U.S. President Donald Trump began his two-day Korean Peninsula visit Tuesday walking amid weapons of war but voicing optimism for peace.

Time and again, Trump has issued combative warnings to Pyongyang as he urged it to abandon its nuclear program. But as he began his two-day South Korean visit, closely watched from both sides of Korea's demilitarized zone, he initially struck a more hopeful tone.

"Ultimately, it'll all work out," said Trump while at Camp Humphreys. "It always works out. Has to work out."

The comment echoed the sentiment of his tweet hours earlier, when he left Japan for South Korea, the second stop of his lengthy Asian trip, which is centered on pressuring North Korean dictator Kim Jong Un to abandon his weapons program and cease threatening the United States or any of its regional allies.

"Getting ready to leave for South Korea and meetings with President Moon, a fine gentleman. We will figure it all out!" Trump wrote.

South Korean President Moon Jae-in, during Trump's official welcome ceremony in Seoul, said he hoped Trump's visit will be an opportunity to resolve "anxiety" in the region over North Korea.

"I know that you have put this issue at the top of your security agenda," said Moon. "So I hope that your visit to Korea and to the Asia-Pacific region will serve as an opportunity to relieve some of the anxiety that the Korean people have due to North Korea's provocations and also serve as a turning point in resolving the North Korean nuclear issue."

Trump, in his own brief remarks, did not mention North Korea, though he later said Pyongyang would be "front and center" of discussions.

When presidents travel overseas, every word is parsed and every action studied. That scrutiny will be intensified in South Korea, Trump's second stop on his lengthy Asia trip, where he will try to reassure Seoul while risking antagonizing Pyongyang. Trump has suggested that even while in range of Pyongyang's missiles, he will not change his inflammatory rhetoric, which has included deriding Kim Jong Un as "Little Rocket Man."

Much like he did in his visit to Japan, Trump indicated he would place the interlocking issues of security and trade at the heart of his visit. The president said Tuesday that he had a "terrific" meeting scheduled on trade, adding, "hopefully that'll start working out and working out so that we create lots of jobs in the United States, which is one of the very important reasons I'm here." He praised South Korea for its significant purchases of American military equipment and urged the two nations to have more equitable trade relationship.

At Camp Humphreys, Trump shook hands with American and Korean service members and sat with troops for lunch in a large mess hall U.S. and South Korean officials have said the base visit was meant to underscore the countries' ties and South Korea's commitment to contributing to its own defense. Burden-sharing is a theme Trump has stressed ever since his presidential campaign.

But Trump is skipping the customary trip to the demilitarized zone separating north and south--a pilgrimage made by every U.S. president except one since Ronald Reagan as a demonstration of solidarity with the South. Trump has not ruled out a military strike and backed up his strong words about North Korea by sending a budget request to Capitol Hill on Monday for $4 billion (457 billion yen) to support "additional efforts to detect, defeat, and defend against any North Korean use of ballistic missiles against the United States, its deployed forces, allies, or partners."

The other question looming over the visit is Trump's relationship with Moon, with whom he does not nearly share the close friendship he has with Abe.

Trump and Moon agree on the need to pressure the North with sanctions and other deterrence measures. But Trump has threatened to "totally destroy" the North, if necessary, and repeatedly insisted that all options are on the table. Moon, meanwhile, favors dialogue as the best strategy for defusing the nuclear tension and vehemently opposes a potential military clash that could cause enormous casualties in South Korea.

Moon, whom experts believe will try to tighten his bond with Trump, made a surprise visit to Camp Humphreys, praising the American commitment to the peninsula. Moon, in a speech to U.S. troops, said "you are the most reliable friend of the Republic of Korea, who stood with us and bled with us in our most difficult time," apparently referring to the allied defense of South Korea during the 1950-53 Korean War.

Moon also signaled that he will follow the example set by Japan and other countries that have welcomed Trump with lavish greetings, rolling out an elaborate greeting for the president, including an elaborate ceremony featuring colorful costumes and flags at South Korea's stately presidential residence known as the Blue House. And he made a point of saluting the recent gains of the U.S. stock market, a favorite Trump talking point, and congratulating the president ahead of the one-year anniversary of his election.

Trump smiled broadly.