TAIPEI -- Taipei Mayor Ko Wen-je, a surgeon-turned independent politician, is riding a wave of popularity as Taiwanese voters grow disillusioned with mainstream political parties.

With just a month or so left until islandwide local elections, which are widely seen as a warm-up for the 2020 presidential poll, Ko is gaining support from a growing number of independent voters even as the ruling Democratic Progressive Party, which traditionally favors independence from China, and the more China-friendly Kuomintang, or the Nationalist Party, struggle.

Beijing, some DPP related sources pointed out, appears to be throwing its weight behind a Ko presidential run, perhaps hoping to split the vote among Kuomintang opponents, putting the unpopular Nationalist Party back in power.

Part of Ko's success lies in his effective use of social media, which is helping him emerge as a presidential contender. At the end of September, Ko drew a huge crowd when he appeared at an event at National Taiwan University. He was mobbed by selfie-seeking students.

A 21-year-old woman at the event said she felt the mayor was close to the public and described him as "totally different" from other politicians.

The local elections are scheduled for Nov. 24, a little over a year before Taiwanese voters choose their next president in January 2020. In the meantime, the political rhetoric will sharpen.

The DPP, led by President Tsai Ing-wen, has seen its approval rating fall sharply as China tightens the screws on it, offering large dollops of aid to the few countries that still recognize Taiwan. Some have opted for diplomatic ties with Beijing.

The DPP's policy initiatives, including changes to labor regulations and the public pension system, have also created a fierce backlash.

But the DPP's troubles have not helped the Kuomintang, which remains wedded to a highly unpopular pro-China agenda.

As mayor of Taipei, Ko has become an outspoken opponent of the main political parties without giving up his position as an independent. This has triggered speculation among Taiwanese voters about whether he will run for president. Although Ko has yet to reveal his plans, Taiwanese media are running feature stories that call him a contender for the island's top job.

There are two factors behind Ko's meteoric rise. One is the former surgeon's lack of political affiliation. Tso Yi-en, an assistant professor at Soochow University, says Ko appears "sincere" because he differs from the typical politician.

The other is his astute online campaigning. He often uses live video streaming to communicate with the public and frequently appears on popular YouTube programs. His social media strategy has helped him appear a breath of fresh air in Taiwan's stale politics.

Ko was elected Taipei mayor in the previous local elections, in 2014. He is seen as a shoo-in for the upcoming mayoral election, where he will face challengers from the DPP and Kuomintang.

The biggest issue for any high-profile election in Taiwan is the question of unification with China. The China policies of presidential candidates, in particular, are closely scrutinized.

During a visit to China, Ko used the phrase "liang an yi jia qin," which was once uttered by Chinese President Xi Jinping to mean that Beijing and Taipei are as close as family. While this gesture was warmly welcomed by Chinese leaders, it raised concerns in Taiwan of Ko being pro-China.

Regarding relations with Beijing, Ko stresses his career as a physician and prefers the pragmatic approach. He has signaled flexibility in cross-strait relations, seeking practical ties between the two governments. It is unclear, however, whether Ko will be able to maintain this middle-of-the-road stance, which critics will depict as waffling if he runs for president.

In August, China Central Television, the country's leading state-run TV broadcaster, aired a feature program on the Taipei mayor. The program described Ko as very popular among young Taiwanese, an indirect show of support.

A DPP official said Beijing seems to be betting that Ko's rise to political prominence will put additional pressure on the embattled Tsai administration.

Many of the voters flocking to Ko are indeed DPP supporters. If Ko becomes a presidential candidate, he will siphon votes from the DPP, helping the Kuomintang campaign, according to political pundits. Some senior DPP members maintain that Ko is the biggest obstacle to a second term for Tsai.