Image copyright AFP/Getty Images Image caption The election appears to hinge on parties' attitudes to Beijing

Taiwan has voted in polls that could see the island elect its first female leader and set an uncertain course for future relations with China.

Results are expected at about 20:00 local time (12:00 GMT).

If Tsai Ing-wen leads her opposition Democratic Progressive Party to power, it will be a victory for Taiwan's pro-independence camp.

Eric Chu stood for the ruling KMT, which oversaw improved ties with China.

China sees the island as a breakaway province - which it has threatened to take back by force if necessary - and is bound to be watching the election closely.

Saturday's polls come just months after a historic meeting between the leaders of the two sides, the first in more than 60 years when outgoing Kuomintang (KMT) President Ma Ying-jeou met Chinese President Xi Jinping in Singapore in November for talks that were seen as largely symbolic.

But it is the flagging economy as well as Taiwan's relationship with China that are the key issues for voters.

Read more about Taiwan's election

Image copyright EPA

Why does this election matter?

Who is running?

Is it all about the economy?

What's behind the China-Taiwan divide?

If Ms Tsai, 59, wins, she would be only the second DPP president in Taiwan's history.

The first was by pro-independence advocate Chen Shui-bian - during his time as president between 2000 and 2008 tensions escalated with China.

Ms Tsai, however, has not made her stance clear. A former scholar, she has said she wants to "maintain [the] status quo" with China.

But opponents say relations will deteriorate as she does not recognise the "one China" policy. She became chairwoman of the DPP in 2008, after it saw a string of corruption scandals.

Image copyright Getty Images Image caption Tsai Ing-wen was surrounded by reporters after casting her vote

Image copyright Reuters Image caption Eric Chu risks paying the price for his party's warm stance towards China

She lost a presidential bid in 2012 but has subsequently led the party to regional election victories. She has won increased support from the public partly because of widespread dissatisfaction over the KMT and Mr Ma's handling of the economy and widening wealth gap.

Eric Chu, 54, is the mayor of New Taipei City and stepped up to become chairman of the party in October. The KMT is at risk of losing its majority in the legislature for the first time in history.

The former accounting professor is popular with young people in the party, but has not been able to change public opinion that is increasingly unhappy with the party's friendly stance towards China and the island's economic travails.

In 2014, hundreds of students occupied the parliament in the largest show of anti-Chinese sentiment on the island for years. Labelled the Sunflower Movement, protesters demanded more transparency in trade pacts negotiated with China.

The K-pop dimension

Image copyright Youtube

Taiwan's election has an unlikely third main protagonist - 16-year-old Chou Tzuyu of South Korean girl band Twice.

The Taiwanese singer has appeared in a video bowing and apologising (in Mandarin) after being seen waving a Taiwan flag - in a row that has dominated local media coverage.

Chou said she felt "proud to be Chinese" and said there was "only one China" - but many on the island felt she had been coerced into saying sorry.

Presidential frontrunner Tsai Ing-wen insisted holding a Taiwan flag was "a legitimate expression of national identity", however Beijing's Taiwan Affairs Office said the row was being exploited to "stir up feelings".

Analysis: Cindy Sui, BBC News, Taipei

The election results could mark a turning point in Taiwan's democracy and relationship with China.

If the DPP wins, it means the island is moving towards a political system in which voters prefer to transfer power from one party to another, ending decades of mostly KMT rule.

That could make relations with China uncertain, because unlike the KMT, the DPP favours Taiwan's independence and does not recognise the Republic of China (Taiwan's official name) and the People's Republic of China as part of "one China".

A defeat for the KMT will present a serious challenge for Beijing. It was the Communists' bitter enemy during the civil war, but is now China's best hope, and perhaps only hope, of peacefully reunifying with Taiwan. The KMT fled to Taiwan after losing the war and its charter and leaders still favour eventual unification.

Beijing is closely watching the elections to gauge Taiwanese people's sentiments and what those sentiments will mean for its goal of reunifying with the last inhabited territory - following Hong Kong and Macau - that it feels was unfairly snatched from it by Japan as a colony in 1895, and then ruled separately by the KMT after the civil war.

Correction: this story has been amended to correct a mistake in the original which said if Ms Tsai won, it would only be the DPP's second-ever election victory. In fact, the DPP won elections in 2000 and 2004. Ms Tsai's victory makes her the second-ever DPP president of Taiwan.