China urged Taiwan to continue co-operation between the mainland and the self-ruled island after the pro-Beijing ruling party was routed in local elections.
The defeat in yesterday's elections of the Nationalist Party, which lost nine cities and counties, including its long-time strongholds Taipei, the capital, and the major central city of Taichung, led to the resignation of Premier Jiang Yi-huah, who heads the Cabinet. President Ma Ying-jeou promised to make changes.
The election losses could jeopardise six years of talks with China that have led to 21 agreements, helping to boost Taiwan's economy, while raising Beijing's hopes for political reunification.
Beijing has claimed sovereignty over Taiwan since the Chinese civil war of the 1940s, but since taking office in 2008, President Ma has set aside the old disputes to ease tensions through talks.
A senior Chinese official urged people in Taiwan to protect those gains.
"We hope compatriots across the Strait will cherish hard-won fruits of cross-strait relations, and jointly safeguard and continue to push forward peaceful development of cross-strait relations," said Ma Xiaoguang, spokesman for the State Council Taiwan Affairs Office.
Taiwanese have been watching closely as Beijing takes a hard-line stance on demands for democratic rule in Hong Kong, a semi-autonomous Chinese city that has been gripped by more two months of pro-democracy protests.
The heavy losses will make it tougher for the president's Nationalists to hold onto the presidency in 2016.
"I must express apologies to the Nationalist Party and its supporters for making everyone disappointed," he said.
"I've received the message people have sent via these elections. It's my responsibility and I will quickly offer a party reform plan to address everyone's demands. I won't avoid responsibility."
The chief opposition Democratic Progressive Party picked up seven offices in the elections. It favours continuing talks with China's Communist leadership, but disputes the dialogue framework that binds the two sides under Beijing's jurisdiction, instead preferring talks in an international setting.
"We want to send the Nationalists a warning," said Lin Wen-chih, a 48-year-old film producer who voted for the winning independent Taipei mayoral candidate, Ko Wen-je.
"Taiwan is an independent country. We don't want the Nationalists to take measures that would have it eaten up (by China)."
A weakened Nationalist Party, also known as the Kuomintang, or KMT, may erode President Ma's mandate before 2016 to sign a pact with China to cut import tariffs, set up official representative offices on both sides and push for a meeting with Chinese President Xi Jinping.
If the opposition party wins the presidency, Beijing is likely to suspend deals with Taiwan.
In March, the government faced thousands of student-led protesters who occupied parliament and nearby streets in Taipei to stop ratification of a service trade liberalisation agreement with China.