GYEONGJU, South Korea — The United States and South Korea advanced trade talks Wednesday, addressing details of $350 billion that would be invested in the American economy, after negotiations and ceremonies that included the presentation of a gold medal and crown to President Donald Trump.

Both were gifts from the country’s president, Lee Jae Myung, who dialed up the flattery while Washington and Seoul worked to nail down financial promises during the last stop of Trump’s Asia trip.

Although both sides said progress has been made — Trump said things were “pretty much finalized” — no agreement has been signed yet. The framework includes gradual investments, cooperation on shipbuilding and the lowering of Trump’s tariffs on South Korea’s automobile exports, according to Kim Yong-beom, Lee’s chief of staff for policy. The White House did not immediately respond to a request for comment. Kim said the two countries have agreed to keep reciprocal tariffs at 15%, as they have been since August, and further agreed to apply that rate to automobiles and auto parts, South Korea’s largest exports to the United States. Autos and parts had been facing a 25% tariff, putting automakers such as Hyundai and Kia at a disadvantage against Japanese and European competitors, which face 15%.

Despite the lack of immediate confirmation from U.S. officials on those points, it was apparent progress had been made on difficult issues after a day of adulation for the visiting American president from his hosts.

There was a special lunch menu featuring U.S.-raised beef and a gold-adorned brownie. A band played Trump’s campaign anthem of “Y.M.C.A.” when he stepped off Air Force One. Lee told him that “you are indeed making America great again.”

Trump can be mercurial and demanding, but he has a soft spot for pomp and circumstance. He was particularly impressed by a choreographed display of colorful flags as he walked along the red carpet.

“That was some spectacle, and some beautiful scene,” Trump told Lee during their meeting. “It was so perfect, so flawlessly done.”

Earlier in the day, Trump even softened his rhetoric on international trade, which he normally describes in predatory terms where someone is always trying to rip off the United States.

“The best deals are deals that work for everybody,” he said during a business forum.

Washington and Seoul have been working on a trade deal

Trump was visiting while South Korea is hosting the annual Asia-Pacific Economic Cooperation summit in the historical city of Gyeongju. He previously stopped in Japan, where he bonded with the new prime minister, and Malaysia, where he attended a summit of the Association of Southeast Asian Nations.

The Republican president has been trying to tie up trade deals along the way, eager to show that his confrontational approach of tariffs is paying dividends for Americans who are uneasy about the job market and watching a federal government shutdown extend into its fifth week. However, South Korea has been particularly tough to crack, with the sticking point being Trump’s demand for $350 billion of direct investment in the U.S.

Korean officials say putting up cash could destabilize their own economy, and they’d rather offer loans and loan guarantees instead. The country would also need a swap line to manage the flow of its currency into the U.S.

Trump, after meeting with Lee, said “we made our deal pretty much finalized.” He did not provide any details.

Oh Hyunjoo, a deputy national security director for South Korea, told reporters earlier in the week that the negotiations have been proceeding “a little bit more slowly” than expected.

“We haven’t yet been able to reach an agreement on matters such as the structure of investments, their formats and how the profits will be distributed,” she said Monday. It’s a contrast from Trump’s experience in Japan, where the government has worked to deliver the $550 billion in investments it promised as part of an earlier trade agreement. Commerce Secretary Howard Lutnick announced up to $490 billion in specific commitments during a dinner with business leaders in Tokyo. Lee, speaking at the business forum before Trump arrived, warned against trade barriers.

“At a time when protectionism and nationalism are on the rise and nations focus on their immediate survival, words like ‘cooperation,’ ‘coexistence’ and ‘inclusive growth’ may sound hollow,” he said. “Yet, paradoxically, it is in times of crisis like this that APEC’s role as a platform for solidarity shines brighter.”