Taiwan's pro-China ruling Nationalist Party suffered worse-than-expected losses in local island-wide elections Saturday, dealing a stiff blow to a president who has staked his reputation on closer ties with Beijing, and leading the premier to resign.

The Nationalists lost eight city and county elections, including in longtime strongholds Taipei, the capital, and the major central city of Taichung. Pre-election polls had forecast defeats only in Taipei, Taichung and Keelung.

The heavy losses point to an electorate that is souring on President Ma Ying-jeou's forging of closer ties with mainland China, and will make it tougher for the Nationalists to hold onto the presidency in 2016.

Premier Jiang Yi-huah — the head of the Cabinet — resigned Saturday night after the defeats, while Ma, who is also Nationalist Party chairman, said he would make changes.

"I must express apologies to the Nationalist Party and its supporters for making everyone disappointed," Ma told a news conference. "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 election losses could jeopardize six years of landmark talks with China that have led to 21 agreements, helping to lift Taiwan's half-trillion-dollar 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, Ma has set aside the old disputes to ease tensions through talks.

Taiwanese have been watching closely as Beijing takes a hard-line stance on demands for democratic rule in Hong Kong, a semiautonomous Chinese city that has been gripped by more two months of pro-democracy protests.

"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)."

Preliminary results show that the chief opposition Democratic Progressive Party gained most in Saturday's vote. The DPP favors 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.

A weakened Nationalist Party, also known as the Kuomintang, or KMT, may erode 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.

Alan Romberg, East Asia Program director with the Stimson Institute, a think tank in Washington, said the opposition party remains a wild card in Taiwan-China relations.

"The Democratic Progressive Party has made a number of adjustments over time, moving from outright opposition to various economic ties to acceptance of such ties as important," he said.

When Democratic Progressive Party President Chen Shui-bian ruled the island from 2000 to 2008, he angered China by advocating for constitutional independence. Beijing threatened then to use force to stop the move.

In March, Ma's government faced thousands of student-led protesters who occupied parliament and nearby streets in Taipei to stop ratification of a service trade liberalization agreement with China.

Get the Monitor Stories you care about delivered to your inbox. By signing up, you agree to our Privacy Policy

"The electorate in general is not happy with the KMT running the country overall, and they're also not happy with the local administration run by the KMT, and they want to have someone new to be in office," Democratic Progressive Party Secretary-General Joseph Wu said.

Taiwanese elected a total 11,130 people to local offices Saturday after months of fierce campaigning marked by personal insults, truck-mounted loudspeakers and firecracker shows.