Trump said Friday that he has not decided whether to proceed with a major arms package for Taiwan after hearing concerns from Chinese President Xi Jinping, framing the issue in terms of risk and distance as he returned to Washington. His comments came after a three-day summit in Beijing in which both leaders said they made “important progress” toward stabilizing U.S.-China relations even as they remain far apart on Iran and Taiwan.

Trump made the remarks while flying back after the summit’s final Beijing engagement, and he acknowledged that he intends to make decisions on the matter. He said the discussion of the Taiwan arms package came up with Xi during the trip, and he cited the potential for conflict in terms of geographic separation, saying the U.S. should not face “a war that’s 9,500 miles away.”

The Taiwan arms question is tied to steps already taken by the administration and by Congress. Trump’s Republican administration in December authorized a record-setting $11 billion weapons package for Taipei, and lawmakers approved a separate $14 billion arms sale to Taiwan in January, though the latter sale cannot move forward until Trump formally sends it to Congress.

Trump also indicated that Xi pressed China’s long-standing position on Taiwan during their conversations. Trump said Xi reiterated China’s strong opposition to Taiwan’s independence, and Trump said, “I heard him out,” adding, “I didn’t make a comment.” The remarks fit a broader theme of the summit, with Chinese officials describing Taiwan as the biggest potential risk to U.S.-China relations.

Analysts have said Trump’s consultation with Xi about Taiwan arms sales could conflict with the so-called Six Assurances, a set of nonbinding U.S. policy principles formulated in 1982 under President Ronald Reagan. The second assurance says the U.S. “did not agree to consult with the People’s Republic of China on arms sales to Taiwan,” and Trump said the 1982 assurances came up in his talks with Xi.

Trump also spoke about nuclear weapons and arms control as he discussed the wider agenda with Xi. Trump said he raised a potential three-way nuclear deal involving the U.S., Russia and China, under which each country would sign a pact to cap the number of nuclear warheads in their arsenals, and he said Xi responded positively. “I got a very a positive response,” Trump said, adding, “This is the beginning.”

The comments came after the last nuclear arms pact, the New START treaty, expired in February, removing caps on the arsenals of the two largest atomic powers. Trump rejected a Russian call to extend the two-country deal for another year and called for “a new, improved and modernized” agreement that would include China, while the Pentagon has estimated that China’s warheads could exceed 1,000 by 2030 and that China’s arsenal exceeds 600 warheads.

Beyond security issues, Trump and Xi also discussed how to manage risks from the Iran war and its impact on energy shipping. Trump said the leaders agreed the Strait of Hormuz—effectively closed since the start of the Iran conflict—needs to be reopened to support global energy demands, noting that about 20% of the world’s oil flowed through the strait before the war started on Feb. 28. Trump said, “We feel very similar about (how) we want it to end,” and he said, “We don’t want them to have a nuclear weapon.”

White House officials said Xi was also opposed to any implementation of tolls on vessels crossing the strait, and they said China showed interest in purchasing U.S. oil to reduce Chinese dependence on Gulf oil. Trump earlier in the week downplayed the importance of the talks on the 11-week-old Iran war, which has fueled surging energy prices and threatens to weaken the global economy.

While the summit’s tone appeared optimistic in public moments, the Iran and Taiwan disputes remained central in the background of the trip. Trump said he is not concerned that U.S.-China relations are in danger, while Chinese officials warned that if differences on Taiwan are handled poorly they could “hurtle the world’s dominant powers toward ‘clashes and even conflicts.’” Trump’s remarks included praise for the setting of the talks at Xi’s official residence, Zhongnanhai, where he said he was impressed by the gardens and Xi called the visit a “milestone,” describing the relationship as “constructive, strategic, stable.”

At home, some Republicans expressed displeasure with Trump’s statement that he has not decided whether to proceed with the Taiwan arms package. Rep. Brian Fitzpatrick, a Pennsylvania Republican, said the U.S. has to support Taiwan and compared it to support for Ukraine, saying, “We have to support Taiwan, just like we have to support Ukraine,” and Rep. Michael McCaul said he was not surprised that Xi took an aggressive posture on Taiwan, adding that “We’ve got to arm Taiwan so they can defend themselves for deterrence.”

In separate comments during the trip, Secretary of State Marco Rubio said U.S. policy toward Taiwan was “unchanged” and cautioned that it would be a “terrible mistake” for China to try to take Taiwan by force, describing Xi’s language on the issue as standard practice.