Taiwan's President Tsai Ing-wen resigned as leader of the ruling Democratic Progressive Party (DPP) Saturday after it suffered major defeats in key mid-term polls, a significant blow to her prospects for re-election in 2020.
The Beijing-friendly main opposition Kuomintang (KMT) made gains in the face of China's increasing pressure on the island.
Taiwan is still awaiting the result of a closely watched referendum on gay marriage, with activists fearing a win for conservative "pro-family" campaigners would turn back the clock on the island's reputation as a trailblazer for marriage equality.
Tsai and her Democratic Progressive Party (DPP) have faced a mounting backlash over domestic reforms as well as concerns about deteriorating ties with China, which still sees self-ruling Taiwan as part of its territory to be reunified. 
Tsai told reporters that she would take "complete responsibility" for the defeat as she resigned as chair of the party. 
The KMT, which oversaw an unprecedented thaw with Beijing before Tsai took office in 2016, declared victory in 15 of 22 city and county seats, up from just six going into the election.
The DPP, which had 13 seats, declared victory in only six and lost its traditional stronghold in Kaohsiung city for the first time in 20 years.
The Taipei mayoral seat is still to be announced. 
Beijing has intensified pressure on Taiwan under Tsai, upping military drills, poaching diplomatic allies and successfully convincing international businesses to list Taiwan as part of China on their websites. 
The DPP is traditionally pro-independence and Tsai has refused to acknowledge Beijing's stance that Taiwan is part of "one China", unlike her KMT predecessor Ma Ying-jeou.
Ahead of the vote, Tsai and DPP officials repeatedly said they believed China has meddled in the lead-up to the elections through a "fake news" campaign, which Beijing has denied. 
The KMT -- which lost the leadership and its majority in parliament two years ago as the public feared it had moved too close to Beijing -- framed the election as a vote of no confidence in Tsai, with promises to boost the economy and promote peaceful relations with China. 
Some analysts said the defeat ruled Tsai out as a candidate for the presidency in 2020.
But others said she may still run, in the absence of an obvious successor.
Observers put the results down to anger over pension cuts and labour reforms, including slashing the number of public holidays, as well as concern that tensions with Beijing are damaging local business.
"The defeat certainly harms Tsai's chances in 2020," said Shih Cheng-feng, a political analyst at Taiwan's National Dong Hwa University, who attributed the results to "widespread public discontent" over the domestic reforms.
Votes in 10 referendums which were also on the ballot paper were still being counted late Saturday and included pro- and anti-gay marriage proposals. 
A landmark court decision legalising gay marriage is still to be implemented and LGBT groups are concerned a referendum win for conservative campaigners could weaken their newly won rights. 
"Pro-family" groups have put forward a referendum calling for marriage to be legally defined as between a man and a woman and for same-sex unions to be governed by a separate law. 
Gay marriage supporters proposed a rival vote that marriage rights should be equal.
The complex ballots also included a referendum on a bid to change the name under which Taiwan competes at international sports events that has already angered China.
The referendums come as an extra headache for Tsai and the DPP. 
Tsai had framed the local elections as a way to "tell the world" that Taiwan would not bow to Beijing.
Social media posts said to be "fake news" have included photos of discarded bananas and pineapples which were framed as proof the government did not care about farmers, as well as posts which suggested Taiwan had failed to get its citizens out of Japan after a typhoon -- a senior Taiwan official in Osaka committed suicide after the reports.
Taiwan's Investigation Bureau also said it is probing Chinese influence on the elections through campaign funding of candidates.
Related Story