In a striking shift of tone, President Donald Trump abandoned his aggressive rhetoric towards North Korea on Tuesday, signaling a willingness to negotiate as he urged Pyongyang to "come to the table" and "make a deal".

Trump, in his first day on the Korean Peninsula, again pushed Pyongyang to abandon its nuclear weapons programme, but sidelined apocalyptic threats for an optimistic note, saying confidently, if vaguely, that "ultimately, it'll all work out." And while he said the United States would use military force if needed, he expressed his strongest inclination yet to deal with rising tensions with Pyongyang through diplomacy.

"It makes sense for North Korea to come to the table and make a deal that is good for the people of North Korea and for the world," Trump said during a news conference alongside South Korean President Moon Jae-in. "I do see certain movement."

Trump said he has seen "a lot of progress" in dealing with North Korea, though he stopped short of saying whether he wanted direct diplomatic talks.

Trump also underlined the US' military options, noting that three aircraft carrier groups and a nuclear submarine had been deployed to the region. But he said "we hope to God we never have to use" the arsenal.

And at an evening banquet, Trump teased about an "exciting day tomorrow for many reasons that people will find out". He did not elaborate.

During his first day in South Korea, Trump at least temporarily lowered the temperature on his previously incendiary language about the North. There were no threats of unleashing "fire and fury" on North Korea, as Trump previously warned.

But he did decree that Kim is "threatening millions and millions of lives, so needlessly" and highlighted one of the central missions of his first, lengthy Asia trip: To enlist many nations in the region, including China and Russia, to cut off Pyongyang's economic lifeblood and pressure it into giving up its nuclear programme.

Moon, who has been eager to solidify a friendship with Trump, said he hoped the president's visit would be a moment of inflection in the standoff with North Korea, adding that the two leaders had "agreed to resolve the North Korea nuclear issue in a peaceful manner" that would "bring permanent peace" to the peninsula.

"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."

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. Though Trump has defended his inflammatory rhetoric against North Korea, he shied away from it Tuesday while in range of Pyongyang's missiles.

But he did bemoan that previous administrations had not handled Pyongyang, saying: "Now is not the right time to be dealing with this but it's what I got."

He began his day in South Korea with a visit to Camp Humphreys, a joint US-Korean military base, but even as he walked among the weapons of war, he struck a hopeful note, saying: "It always works out."

Much like he did on his visit to Japan, Trump indicated he would place the interlocking issues of security and trade at the heart of his visit. He praised South Korea for significant purchases of American military equipment and urged the two nations to have a more equitable trade relationship. Moon said the two agreed on lifting the warhead payload limits on South Korean ballistic missiles and cooperating on strengthening South Korea's defence capabilities through the acquisition or development of advanced weapons systems.

Trump also pushed his economic agenda, saying the current US-Korea trade agreement was "not successful and not very good for the United States." But he said 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."

At Camp Humphreys, Trump shook hands with American and Korean service members and sat with troops for lunch in a large mess hall. US 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 defence.

But Trump was expected to skip the customary trip to the demilitarized zone separating north and south, a pilgrimage made by every US president except one since Ronald Reagan, as a demonstration of solidarity with the South. Trump has not ruled out a military attack, and he backed up his strong words about North Korea by sending a budget request to Capitol Hill on Monday for $4bn 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."

North Korea has tested more than a dozen missiles this year but none in nearly two months.

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 repeatedly insisted that all military options are on the table and suggested that Moon was being too lenient on the North. 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.

But Moon played the gracious host Tuesday. Following the example set by Japan and other countries that have welcomed Trump with lavish greetings, Moon rolled out an elaborate arrival ceremony featuring colourful 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 US stock market, a favorite Trump talking point, and congratulating the president a day before the one-year anniversary of his election.

Trump smiled broadly.