WASHINGTON — Whether by accident or design, President-elect Donald Trump is signaling a tougher American policy toward China, sparking warnings from both the outgoing Obama administration and Beijing.

On Monday, White House spokesman Josh Earnest said progress with the Chinese could be “undermined” by a flare-up over the sovereignty of Taiwan, the self-governing island the U.S. broke diplomatic ties with in 1979.

That split was part of an agreement with China, which claims the island as its own territory, although the U.S. continues to sell Taiwan billions in military equipment and has other economic ties.

Trump broke protocol last week by speaking with Taiwanese President Tsai Ing-wen, then took to Twitter to challenge China's trade and military policies.

“It's unclear exactly what the strategic effort is,” Earnest said. “I'll leave that to them to explain.”

So far, Trump's advisers have struggled to explain his action, sending mixed messages about whether the conversation with Taiwan's leader was a step toward a new policy or simply a congratulatory call.

Trump has pledged to be more “unpredictable” on the world stage, billing the approach as a much-needed change from President Barack Obama's deliberative style and public forecasting about U.S. policy.

But Trump's unpredictability is likely to unnerve both allies and adversaries, leaving glaring questions about whether the foreign policy novice is carrying out planned strategies or acting on impulse.

A commentary at China's state-run Xinhua news agency issued a veiled warning.

“Succeeding a mostly upward U.S.-China relationship, Trump also needs to resist the light-headed calls for provocative and damaging moves on China by some hawkish political elites,” said the commentary by Luo Jun.

“The outdated zero-sum mindset is poisonous for Washington's foreign relations. It would be a mistake to think that Washington could gain from undercutting Beijing's core interests.”