Taiwanese President Tsai Ing-wen arrives to preside over Taiwan’s navy signing of a memorandum of understanding last month with Taiwanese shipbuilder CSBC Corp. to make submarines in Kaohsiung in southern Taiwan. (Ritchie B. Tongo/European Pressphoto Agency)

The call was weeks in the making, but the tweets — those tweets — came as a shock.

Just after 11 p.m. on Dec. 2, Taiwan’s president, Tsai Ing-wen, and a small group of advisers gathered to call the U.S. president-elect. Their goal, said a person with direct knowledge of the matter, was to put Taiwan on Donald Trump’s agenda, to set off on the right foot with the soon-to-be most powerful man in the world. 

The roughly 10-minute exchange was “friendly,” the person said, and Trump seemed “well-briefed.” The call ended without incident, aides drafted a short statement for the morning, and by 11:45 p.m., the Taiwan side, feeling satisfied, went to sleep.

When they woke, they saw that Trump had been tweeting; Taiwan was the biggest story in the world.

“The President of Taiwan CALLED ME today to wish me congratulations on winning the Presidency. Thank you!” he tweeted. And then: “Interesting how the U.S. sells Taiwan billions of dollars of military equipment but I should not accept a congratulatory call.”

The call was the first direct contact between a Taiwanese leader and a U.S. president or president-elect in decades. Was Trump signaling an abrupt policy shift?

Four months after the call and follow-up comments by Trump had put a question mark over U.S. engagement in Asia, and with Chinese President Xi Jinping set to visit Trump’s Mar-a-Lago resort in Florida this week, Taiwan is wondering whether it is in for another Trump-style twist.

In Taipei, the call initially created hope that the incoming U.S. president would be willing to challenge old orthodoxies, to create new strategic space.

But in the months since his inauguration, Trump and his aides have sent mixed signals on China, deepening uncertainty about their plans. Taiwan government officials are hoping for the best but planning for the worst. 

“We are preparing for every scenario,” said a senior official who spoke on the condition of anonymity to discuss the matter candidly.

Jason Hsu, a legislator from the opposition Kuomintang, or Nationalist Party, worried that Taiwan had been “played” by the president of the United States. “Trump threw a few chips on the table,” he said, “but he did not reveal his whole hand.”

To understand why a short phone call and a few tweets sent Washington and Beijing into a frenzy, consider the recent history of Taiwan.

When the United States opened diplomatic relations with China in 1979, it broke off formal ties to Taiwan. Under the one-China policy, Washington acknowledges China’s position that there is only one Chinese government but does not endorse it, and maintains “robust unofficial” relations with Taiwan.

Under Trump’s and Tsai’s predecessors, Barack Obama and Ma Ying-jeou, U.S.-Taiwan ties were not a major focus. Ma was bent on building closer economic links to China, and the Obama administration, for the most part, took a hands-off approach. 

As a thriving democracy claimed by the rising authoritarian power across the strait, Taiwan sees its diplomatic efforts curbed at every step. The Taiwan side believed a conversation with Trump would help ties, officials said, and knew that contact with the president-elect could showcase their strategic clout.

Following the call, Trump signaled that things were headed in a new direction, first with the tweets. Then, in a Dec. 11 interview, he said the U.S. approach to China was in play.

“I fully understand the one-China policy,” he said. “But I don’t know why we have to be bound by a one-China policy unless we make a deal with China having to do with other things, including trade.”

By February, when Trump and Xi finally talked, the U.S. president had changed his tune. In a statement, the White House said Trump “agreed, at the request of President Xi, to honor our ‘one China’ policy.” 

Taiwan officials and analysts are not sure what to make of the shift but speculated that it tracks changes­ in who is advising Trump, with Taipei-friendly GOP old-timers losing ground to the president’s daughter and son-in-law, who seem to favor better relations with Beijing.

Given all the policy uncertainty and Trump’s propensity to go off-script, Taiwan is preparing for a wide range of outcomes from the Mar-a-Lago meeting.

A positive result, officials and analysts said, would be no comment from Xi and a strong statement of support from Trump. Some would be relieved if the presidents simply said nothing, saving the Taiwan question for another day.

Lo Chih-cheng, a legislator who heads the ruling Democratic Progressive Party’s international affairs department, said he thought Trump and his advisers recognized Taiwan’s strategic importance. “If he is serious about U.S. military influence in the region, then Taiwan is something you can’t give up,” he said.

Yet there is always a fear that Taiwan will be turned into a bargaining chip. “The concern now is that if everything is on the table, then Taiwan may be on the table,” Lo said. 

Taiwanese officials spoke with particular fear about the prospect of an official communique on U.S.-China ties. In fact, any sort of joint public statement is considered risky for Taiwan.

“One of the worst-case scenarios for Taiwan is a statement where, either by error or lack of preparation, Trump says something — or Xi says something that Trump doesn’t contradict — that implies that they have reached a deal,” said William A. Stanton, who served as de facto U.S. ambassador to Taiwan from 2009 to 2012 and now heads the Center for Asia Policy at Taiwan’s National Tsing Hua University.

“What makes it so difficult is that there are so many different things going on, so many contradictions, so much incoherence: Trump contradicts himself, his secretaries contradict him, then they contradict each other,” he continued. 

“Who is preparing Trump and how prepar­able is he? Unless he has a script and he sticks to it, there’s no way to know what he will say,” he said.

For now, the Taiwan side is bracing for dealmaking — and perhaps a few surprises.

“At the meeting between the two leaders, there may be a lot of give-and-take,” said the senior Taiwanese government official. “We hope that any improvement in U.S.-China ties will not come at Taiwan’s expense.”