Taiwanese President Chen Shui-bian has made a surprise transit stop in Libya, on his way home from Latin America.
President Chen was warmly received in Costa Rica and Paraguay
Mr Chen met family members of Libyan leader Muammar Gaddafi, in a visit likely to anger China.
The Taiwanese leader's route to and from South America has already caused controversy.
In a sign of his displeasure with the US for refusing him a more high-profile stopover, Mr Chen declined a transit stop in Alaska.
His overseas trips are followed closely by China, which considers Taiwan part of its territory, and disapproves of any visits that imply Taiwanese sovereignty.
Paraguay and Coast Rica, the focus of Mr Chen's visit, are two of a decreasing number of countries - now just 25 - that recognise Taiwan diplomatically.
Libya, however, has diplomatic ties with China, and Mr Chen's stop there is likely to anger the authorities in Beijing.
Pressure on the US
It is still unclear whether Mr Chen met Colonel Gaddafi during his stay in Tripoli, but did meet some of the Libyan leader's family.
"Discussions were about setting up representative offices, boosting ties and trade, petrochemical and infrastructure issues," Taiwanese foreign ministry spokesman Michel Lu told the island's China Times newspaper.
This is Mr Chen's fifth trip to Latin America since becoming president in 2000, and on all his previous visits he has included transit stops in key US cities.
But this time the US only offered a stop in Alaska, which Mr Chen rebuffed, accusing China of applying pressure on Washington.
The Chinese "sought brutally and savagely to block the transit stops and foreign trips of our senior officials," Mr Chen said as he left Taipei.
Taiwan and the US are traditionally allies, but analysts say the timing of Mr Chen's current visit is particularly sensitive, given Chinese President Hu Jintao's trip to Washington last month.
Relations between China and Taiwan have also cooled this year, with Mr Chen abolishing a body set up to deal with relations with Beijing.
Washington appeared disquieted by the move at the time, anxious as it is to maintain the delicate status quo between the two sides.