For years, Taiwan has viewed its dominance in supplying countries with cutting-edge chips as a shield from Chinese aggression. Now, officials are testing out semiconductors as a diplomatic sword.

On Tuesday, Taipei for the first time unilaterally imposed semiconductor export controls on a country, limiting shipments to South Africa for actions that "undermined our national and public security.” That marked the latest twist in a long-running spat over the nation’s efforts to weaken ties with Taiwan — a key demand of Beijing from its formal partners.

Taipei’s chip curbs reflect its strategy to increasingly use economic and trade policy for diplomatic goals, according to a Taiwanese official familiar with the matter. Similar measures could be imposed on other unfriendly nations, the person added, asking not to be identified discussing sensitive issues.