Taiwan’s Ma Ying-jeou is learning a very valuable lesson the hard way: If you want to cozy up to China, it’s best not to be too Chinese about it.

The point is being driven home by hundreds of thousands of student protesters, enraged by the Taiwanese president’s attempt to enact a trade pact with China in the dark of night. The deal to open up the island’s service industries is controversial enough. But when Ma reneged on a promise to allow a clause-by-clause review before implementing it, he infuriated the island’s youth. Ma seems to have forgotten he’s running a democracy, not a Communist Party precinct.

This nascent battle between students and Ma’s ruling Kuomintang Party is about more than bank branches and beauty parlors. It’s about where Taiwan intends to position itself in the tug of war between Xi Jinping’s China and Barack Obama’s United States for influence in Asia.

No doubt Xi and Obama never expected Taiwan to flare up as an issue between them this year. In his almost six years as president, Ma has focused intently on improving ties with the mainland. But the students who last month stormed Taiwan’s Cabinet compound for the first time in history demonstrated the limits and unappreciated consequences of that policy. Although not exactly an Arab Spring, this “Sunflower Movement” suggests the calm across the Taiwan Strait that Beijing and Washington took for granted may officially be over.

Ma should shelve the China deal for now. His argument that backing out would undermine Taiwan’s economy and international credibility pales in comparison to the need to preserve the island’s hard-won democracy. Yes, China is Taiwan’s largest trading partner and Ma’s economy has been hit hard by the demise of the personal computer, on which the island largely bet its future. Clearly, alienating Beijing carries costs.

But so does a policy that depends on China’s goodwill. Taiwan’s sophisticated economy has more in common with those of the U.S. and Japan than China, and it should ink more free-trade pacts with developed nations, like the one recently signed with New Zealand. Its human capital, infrastructure and financial resources give Taiwan the leverage to move up the value-added ladder in the search for the next game-changing technology. That’s the only way Taiwan is going to maintain or improve its per capita income of about $39,000 — not by selling TVs and PCs to Chinese.

Ma’s bigger misstep was assuming his people would go along quietly with his Politburo-esque maneuver. Young Taiwanese appear to be mulling a very different future, one that shares the values espoused by the opposition Democratic Progressive Party. Are they proud of their Chinese heritage? Sure. But that doesn’t mean they’re prepared to give up freedoms and rights that still remain a dream on the mainland.

The Communist Party’s subjugation of its own citizens and overreach in Hong Kong is feeding the movement. Young Taiwanese have watched as China has backtracked on pledges to allow Hong Kongers to elect their own leaders. Beijing’s attempts to impose vaguely written anti-sedition laws and patriotic education, and to clamp down on the city’s freewheeling press, are equally unnerving. China should be learning from Hong Kong’s civil liberties and first-world financial system, not the other way around.

Taiwanese have to wonder what Beijing might try if Ma got his way and effectively merged the two economies. Trade pacts with China can involve political control as much as economics: Just as oil gives Russia undue influence over Ukraine, China’s trade brawn gives its vast leverage from Indonesia to Nigeria. If it’s displeased by events in Taipei, Xi could just cut off the flow of business to Taiwan.

Already racked by geopolitical crises from Ukraine to North Korea, the world doesn’t need a new cold war between China and Taiwan. But Ma’s miscalculation provides a chance for him to start fresh. He should try harder to sell his vision for expanding the 2010 Economic Cooperation Framework Agreement that led to this controversial services deal. Where differences emerge, he should tweak the pact accordingly. In case Ma forgot, that’s how democracy works.

William Pesek is a Bloomberg View columnist based in Tokyo. Follow him on Twitter at @williampesek.