Taipei: Update: Voters in Taiwan backed anti-gay marriage referendums on Saturday.
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 blow to her prospects for re-election.
"As chairperson of the ruling party, I will take complete responsibility for the outcome of today's local elections," Tsai told reporters.
"I resign as DPP chairperson. Our efforts weren't enough and we let down all our supporters who fought with us. I want to express our most sincere apologies."
Tsai and DPP have faced a mounting backlash over domestic reforms and concerns about deteriorating ties with China, which still sees self-ruling Taiwan as part of its territory to be reunified.
The main opposition Kuomintang party (KMT), which oversaw an unprecedented thaw with Beijing before Tsai took office in 2016, has declared victory in 15 of 22 city and county seats, up from just six going into the election.
The DPP, which went into the election with 13 seats, has declared victory in only six and has lost its traditional stronghold in Kaohsiung city for the first time in 20 years.
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 improve relations once more with China.
Some traditionally pro-DPP groups said before the election that they wanted to punish the party as their businesses had taken a hit from cross-strait tensions.
Votes in 10 referendums which were also on the ballot paper were still being counted late Saturday and include pro- and anti-gay marriage votes.
A landmark court decision legalising gay marriage is still to be implemented and LGBT groups are concerned a referendum win for conservative campaigners could limit 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.
Voters faced lengthy queues as they dealt with complex ballots which also included a referendum on a bid to change the name under which Taiwan competes at international sports events that has already angered China.
Others said they sided with "pro-family" groups.
"The purpose of getting married is to have children and Taiwan's birthrate is already one of the world's lowest," said a female voter who gave her name as Bai.
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, calling called China's pressure "omnipresent" and has said Taiwan's democracy was faced with a crisis due to "outside forces".
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.