TAIPEI, Taiwan — Former U.S. ambassador to the United Nations Nikki Haley said Saturday on a visit to Taiwan that an isolationist policy isn’t “healthy” and called on the Republican Party to stand with her country’s allies, while still putting in good words for the party’s nominee, Donald Trump.

Haley, who ran against Trump for the Republican presidential nomination, told reporters in the capital, Taipei, that supporting U.S. allies, including Ukraine and Israel, is vital. She underscored the importance of Taiwan, which Beijing claims as its territory, to be brought under control by force if necessary.

“I don’t think the isolationist approach is healthy. I think America can never sit in a bubble and think that we won’t be affected,” she said.

While the U.S. doesn’t formally recognize Taiwan, it is the island’s strongest backer and main arms provider. However, Trump’s attempt to reclaim the presidency has fueled worries. He said Taiwan should pay for U.S. protection in an interview with Bloomberg Businessweek published in July and dodged answering the question of whether he would defend the island against possible Chinese military action.

When Haley shuttered her own bid for the Republican nomination, she did not immediately endorse Trump, having accused him of causing chaos and disregarding the importance of U.S. alliances abroad. But in May she said she would be voting for him.

On Saturday, she spoke in Trump’s favor. She said that having previously served with Trump’s administration, “we did show American strength in the world,” pointing to their assertiveness toward China and their sanctioning of Russia and North Korea, among other efforts.

Haley met Taiwanese President Lai Ching-te during this week’s trip. She called for more international backing for the self-ruled island, a coordinated pushback against China’s claims over it, and for Taiwan to become a full member of the United Nations.

Taiwan’s Defense Ministry said Saturday that 38 warplanes and 12 vessels from China were detected around the island during a 24-hour period from Friday morning.