OSAKA, Japan - President Donald Trump and foreign leaders appeared set for a clash at the Group of 20 summit in Japan, as the U.S. president prepared to highlight his unhappiness over trade and European leaders promised to challenge him on climate change.

Trump touched down in this port city shortly after 6:40 p.m. local time and headed to a dinner with Australian Prime Minister Scott Morrison - the first of nine world leaders he is scheduled to meet during the two-day summit. Questioned on his "America First" worldview, Trump took a more conciliatory tone than he did in the hours before departing for Japan when he complained in an interview Wednesday, June 26, with Fox Business that other countries were trying to take advantage of the United States on issues such as trade and defense spending.

"Well, I think I can say very easily that we've been very good to our allies, we work with our allies, we take care of our allies," Trump, flanked by senior aides and Cabinet officials, said at the beginning of his dinner with Morrison. "We even help our allies militarily. So we do look at ourselves and we look at ourselves, I think, more positively than ever before, but we also look at our allies and I think Australia is a good example."

But as the annual gathering began, some foreign leaders signaled they would push back on Trump's constant defiance of international agreements and consensus.

European Council President Donald Tusk and European Commission President Jean-Claude Juncker called climate change an "existential threat" in a letter ahead of the summit and urged other countries to act. In the letter, they restated their commitment to the Paris climate accord from which Trump has taken steps to withdraw.

Trump has questioned the science supporting climate change, and his administration has sought to downplay its significance in statements from international groups or meetings.

"We need to leave a healthier planet behind for those who follow," Tusk and Juncker wrote. They signaled another looming showdown with Trump over climate change in a few months, saying they want to "send a strong message" ahead of the United Nations Climate Summit in September.

French President Emmanuel Macron said this week that he might not agree to a joint statement - or communique - at the end of the G-20 meetings if it does not include strong language addressing climate change. Macron said he viewed failing to address this issue as a "red line" for him during the G-20 in Japan.

Climate change is just one of a number of issues confronting world leaders at the annual global economic summit, and this year's gathering marks one of Trump's last chances to make gains on several of his foreign policy initiatives before the 2020 presidential campaign consumes U.S. politics. He is seeking to resolve an escalating trade fight with China while trying to build consensus for his administration's tougher line against Iran - a view that has him at odds with some of the leaders he'll meet this week in Osaka, including Russian President Vladimir Putin.

The uncertainty surrounding denuclearization talks with North Korea will also be a significant backdrop for the two-day summit here, as the issue is sure to surface in his highly anticipated meeting with Chinese President Xi Jinping on Saturday. Trump will leave for an overnight visit to Seoul later that same day.

Trump rode into Osaka in trademark Trump fashion - using the days and hours before his visit to ratchet up his rhetoric against allies and even his hosts, although the president often levels attacks against world leaders ahead of global gatherings only to scale them back once he meets them in person.

One of Trump's targets as he flew across the Pacific Ocean was Indian Prime Minister Narendra Modi, whose country imposed tariffs on nearly 30 products from the United States earlier this month as payback for Trump's decision to revoke India's preferential trade privileges. The retaliatory tariffs from India are just one of several trade disputes Trump faces heading into this year's G-20 summit.

"I look forward to speaking with Prime Minister Modi about the fact that India, for years having put very high Tariffs against the United States, just recently increased the Tariffs even further," Trump tweeted. "This is unacceptable and the Tariffs must be withdrawn!"

During his trip on Air Force One from Washington, Trump also sought to bolster his hard-line immigration views at a time when he is confronting record levels of migrants arriving at the U.S.-Mexico border. He tweeted that "much can be learned" from Australia's aggressive campaign against refugees and from posted signs used in the country, which include phrases such as "No Way" and "You Will Not Make Australia Home."

But as usual, Trump made clear that he was focusing on other things in addition to the packed economic and foreign policy agenda that awaited him in Osaka. Prominent among them was the first night of the Democratic primary debates hosted by NBC News in Miami, which had some technical difficulties midway through the event that Trump promptly mocked.

The president also called the debates "BORING!" as he prepared to depart Anchorage following a refueling stop.

Trump's planned adversarial approach was clear in ways beyond his confrontational tweets and statements before he left Washington. He decided to add his hawkish trade adviser, Peter Navarro, to the U.S. delegation at the last minute, suggesting he does not plan to offer many compromises during his time in Japan.

One of the most highly anticipated meetings of the G-20 will be Trump's sit-down on Saturday with Xi. Trump has suggested that the meeting will be pivotal as he decides whether to further increase tariffs on an additional $300 billion in Chinese goods.

He is under pressure from some advisers and business executives to delay these new tariffs, but he has not said how he plans to proceed.

"It's ripe for taxing, for putting tariffs on," he said on Fox this week. He said he would do "very substantial" tariffs if he does not cut a deal with China, and he signaled that he feels no pressure to back down.

At the last G-20 summit in Argentina, Trump and Xi agreed to start trade negotiations that were supposed to rewrite the economic relationship between the two countries, but those talks faltered more than a month ago. Trump then moved ahead with tariffs on $250 billion in Chinese imports and has threatened to impose the duties on the rest of China's exports to the United States if Xi does not agree to major changes.

Among other things, Trump has asserted that China must stop stealing U.S. intellectual property, stop forcing U.S. companies to share technology and limit Chinese subsidies for domestic companies that disadvantage U.S. competitors. Trump has also insisted that China purchase more agriculture products from U.S. farmers.

Some White House aides have suggested that Trump could use the Japan summit with Xi to reset talks and delay the imposition of new tariffs, but Trump has publicly been noncommittal.

Meanwhile, Trump took aim at both NATO and at the U.S.-Japan military alliance in comments shortly before leaving Washington - remarks sure to dismay his hosts.

"If Japan is attacked, we will fight World War III . . . with our lives and with our treasure," he told Fox Business, adding, "If we're attacked, Japan doesn't have to help us at all." Japan, he said, "can watch it on the Sony television, OK, the attack."

Japan hosted Trump for a lavish state visit last month, during which time Trump called the alliance between the two countries "ironclad," stronger than ever and only about to get stronger.

Tobias Harris, an expert on Japan at Teneo Intelligence, a political risk consultancy in Washington, said the Trump administration could be trying to get leverage over Japan in its ongoing trade talks and upcoming negotiations on sharing the costs of the U.S. military presence in Japan. But he argued that the comments did not represent a serious threat to the alliance and were therefore not particularly effective as leverage.

"While in theory the president has the power to withdraw from the alliance, in practice, doing so would require overcoming what I expect would be strenuous resistance from the U.S. military, national security establishment and Congress to an alliance that these actors all recognize as indispensable and good for the United States," he said.

Senate Minority Leader Charles Schumer, D-N.Y., chided Trump for picking fights with allies ahead of the meetings and urged him to instead focus on taking a tough stance with China on trade - a rare issue where the two men agree on an overall approach if not on every tactic.

"President Trump, you know it, we've talked about it: you have a once-in-a-generation opportunity to reform China's economic relations with the world and put American businesses and American workers on a level playing field," he said on the Senate floor. "Stay tough. Do not give in."

Schumer also said Trump should warn Putin against interfering in the 2020 U.S. elections, citing the conclusions of special counsel Robert S. Mueller III and the intelligence community that Moscow sought to surreptitiously influence the 2016 presidential contest.

"By directly challenging Putin, he will send a signal - not merely to Putin but to all of our adversaries - that interfering with our election is unacceptable, and that they will pay a price - a strong price - for trying," he said.

This article was written by Seung Min Kim and Simon Denyer, reporters for The Washington Post.