The Latest on local elections in Taiwan (all times local):

8:45 a.m.

China says the results of local elections in Taiwan, where President Tsai Ing-wen’s independence-leaning party suffered a major defeat, reflect a desire for better relations between the mainland and the self-ruled island.

Ma Xiaoguang, the spokesman for Beijing’s Taiwan Affairs Office, says “we have noticed the results of the elections.” He says they reflected “the strong will of the public in Taiwan in sharing the benefits of the peaceful development across the Taiwan Strait, and desires to improve the island’s economy and people’s well-being.”

Supporters of Taipei city mayor and city mayoral candidate Ko Wen-je cheer for Ko's victory in Taipei, Taiwan, Sunday early morning, Nov. 25, 2018. Taiwan's ruling party suffered a major defeat Saturday in local elections seen as a referendum on the administration of the island's independence-leaning president amid growing economic and political pressure from China. (AP Photo/Chiang Ying-ying)
Supporters of Taipei city mayor and city mayoral candidate Ko Wen-je cheer for Ko’s victory in Taipei, Taiwan, Sunday early morning, Nov. 25, 2018. Taiwan’s ruling party suffered a major defeat Saturday in local elections seen as a referendum on the administration of the island’s independence-leaning president amid growing economic and political pressure from China. (AP Photo/Chiang Ying-ying)

He says his government will continue to treat Taiwan as part of China and “resolutely oppose separatist elements advocating ‘Taiwan independence’ and their activities.”

The elections for mayors and thousands of local posts were seen as a key test for the 2-year-old administration of Tsai, whom Beijing has relentlessly attacked over her refusal to endorse its claim that Taiwan is a part of China.

___

Supporters of Taipei city mayor and city mayoral candidate Ko Wen-je cheer for Ko's victory in Taipei, Taiwan, Sunday early morning, Nov. 25, 2018. Taiwan's ruling party suffered a major defeat Saturday in local elections seen as a referendum on the administration of the island's independence-leaning president amid growing economic and political pressure from China. (AP Photo/Chiang Ying-ying)
Supporters of Taipei city mayor and city mayoral candidate Ko Wen-je cheer for Ko’s victory in Taipei, Taiwan, Sunday early morning, Nov. 25, 2018. Taiwan’s ruling party suffered a major defeat Saturday in local elections seen as a referendum on the administration of the island’s independence-leaning president amid growing economic and political pressure from China. (AP Photo/Chiang Ying-ying)

9:55 p.m.

Taiwanese President Tsai Ing-wen has resigned as head of the ruling Democratic Progressive Party to take responsibility for a major defeat suffered by her party in local elections.

Tsai will remain as president and her resignation will have no direct effect on the business of government. At a brief news conference at DPP headquarters late Saturday following the elections, Tsai also said she had refused Premier William Lai’s resignation, saying she wanted him to continue her reform agenda.

Tsai said: “Today, democracy taught us a lesson. We must study and accept the higher expectations of the people.”

A supporter of Taipei city mayor and city mayoral candidate Ko Wen-je cheer for Ko''s victory with slogan
A supporter of Taipei city mayor and city mayoral candidate Ko Wen-je cheer for Ko”s victory with slogan “Keep It Possible” in Taipei, Taiwan, Sunday early morning, Nov. 25, 2018. Taiwan’s ruling party suffered a major defeat Saturday in local elections seen as a referendum on the administration of the island’s independence-leaning president amid growing economic and political pressure from China. (AP Photo/Chiang Ying-ying)

The elections for mayors and thousands of local posts are seen as a key test for the 2-year-old administration of Tsai, whom Beijing has relentlessly attacked over her refusal to endorse its claim that Taiwan is a part of China.

___

8:10 p.m.

Supporters of Taipei city mayor and city mayoral candidate Ko Wen-je cheer in Taipei, Taiwan, Saturday, Nov. 24, 2018. Taiwan's ruling party suffered a major defeat Saturday in local elections seen as a referendum on the administration of the island's independence-leaning president amid growing economic and political pressure from China. (AP Photo/Chiang Ying-ying)
Supporters of Taipei city mayor and city mayoral candidate Ko Wen-je cheer in Taipei, Taiwan, Saturday, Nov. 24, 2018. Taiwan’s ruling party suffered a major defeat Saturday in local elections seen as a referendum on the administration of the island’s independence-leaning president amid growing economic and political pressure from China. (AP Photo/Chiang Ying-ying)

Taiwan’s ruling Democratic Progressive Party has suffered a major defeat in local elections seen as a referendum on the island’s president amid growing pressure from China.

Saturday’s elections for mayors and thousands of local posts are a key test for the 2-year-old administration of President Tsai Ing-wen, whom Beijing has relentlessly attacked over her refusal to endorse its claim that Taiwan is a part of China.

Tsai’s DPP lost the mayorship to the Nationalist party in the southern port city of Kaohsiung, where it had held power for 20 years. The Nationalists ruled Taiwan for decades after it split from mainland China in 1949 amid civil war.

The Nationalists also defeated the DPP in the central city of Taichung, while Ko Wen-je, the independent mayor of Taipei, the capital, appeared on track for a second term.

Supporters of Taipei city mayor and city mayoral candidate Ko Wen-je cheer in Taipei, Taiwan, Saturday, Nov. 24, 2018. Taiwan's ruling party suffered a major defeat Saturday in local elections seen as a referendum on the administration of the island's independence-leaning president amid growing economic and political pressure from China. (AP Photo/Chiang Ying-ying)
Supporters of Taipei city mayor and city mayoral candidate Ko Wen-je cheer in Taipei, Taiwan, Saturday, Nov. 24, 2018. Taiwan’s ruling party suffered a major defeat Saturday in local elections seen as a referendum on the administration of the island’s independence-leaning president amid growing economic and political pressure from China. (AP Photo/Chiang Ying-ying)

___

10:35 a.m.

Taiwanese have begun voting in midterm local elections seen as a referendum on the administration of President Tsai Ing-wen, amid growing pressure from the island’s powerful rival China.

Taipei city mayor and city mayoral candidate Ko Wen-je, center, Ko's families, team members bow to supporters for winning in Taipei, Taiwan, Sunday early morning, Nov. 25, 2018. Taiwan's ruling party suffered a major defeat Saturday in local elections seen as a referendum on the administration of the island's independence-leaning president amid growing economic and political pressure from China. (AP Photo/Chiang Ying-ying)
Taipei city mayor and city mayoral candidate Ko Wen-je, center, Ko’s families, team members bow to supporters for winning in Taipei, Taiwan, Sunday early morning, Nov. 25, 2018. Taiwan’s ruling party suffered a major defeat Saturday in local elections seen as a referendum on the administration of the island’s independence-leaning president amid growing economic and political pressure from China. (AP Photo/Chiang Ying-ying)

The elections that follow Tsai’s landslide victory in 2016 will decide the races for 22 mayors and county magistrates along with thousands of local officials.

Driven from power two years ago, the opposition Nationalists hope to regain territory by counting on their pro-business image and a more accommodating line toward Beijing.

Since her election in 2016, Tsai has maintained Taiwan’s de facto independent status while avoiding calls to declare formal separation from the mainland.

China has been ratcheting up pressure on the island it claims as its own territory by poaching away its diplomatic partners, cutting official contacts and staging threatening military exercises.

Source: The Associated Press