By Chris Hogg
BBC News, Hong Kong
Taiwan's President Chen Shui-bian says he has accepted an invitation to visit Libya, a move likely to anger China.
Mr Chen was invited by Libyan leader Muammar Gaddafi's son
Mr Chen said Taiwan and Libya - which do not have diplomatic ties - would open trade offices in their capitals.
Beijing regards Taiwan as a breakaway province which should be reunited with the mainland, by force if necessary.
The Chinese leadership does all it can to prevent Taiwan's government forming diplomatic ties with foreign countries or joining international organisations.
As a result, just 25 countries count themselves as Taipei's official allies.
Why does it matter if Taiwan's President visits Libya - a country with which it has no diplomatic ties?
If you are sitting in the leadership compound in Beijing, just the suggestion of such a trip rings alarm bells.
China always does whatever it can to ensure President Chen Shui-bian does not get to walk on the world stage.
Beijing does not want anyone to recognise Taiwan as an independent state. It insists the island is Chinese territory. This policy is pretty successful.
Most of those places that do recognise Taiwan are small or impoverished countries in Latin America, the Caribbean and Africa.
So when a more important country, like Libya, suggests it might improve co-operation with Taiwan in areas such as oil, petrochemicals, information technology and security, China is likely to be angry.
Why would the authorities in Tripoli take that risk?
Perhaps this is all about brinkmanship. The announcement comes on the eve of a visit to Libya by China's Foreign Minister, Li Zhaoxing. He is trying to cement closer relations with countries rich in resources China needs, like oil and gas.
Any hint from Tripoli that they are planning to improve relations with Taipei might yet encourage the Chinese to work harder to win over the Libyans to their side.
After all, no date was announced for President Chen's visit, so it might yet be taken off the table at the bidding of Beijing.