Tsai Ing-wen.
© Taiwan Gov’tTaiwan President Tsai Ing-wen.
Afghanistan's return to Taliban rule following the withdrawal of US forces shows Taiwan needs to be "stronger and more united" in ensuring its own defence, President Tsai Ing-wen said Wednesday.

Democratic Taiwan's 23 million people live under the constant threat of invasion from authoritarian Beijing which views the island as its own territory and has vowed to one day seize it.

Washington remains Taiwan's most important unofficial ally and is bound by an act of Congress to sell it defence weaponry.

But the sudden departure of US troops from Kabul has sparked discussion in Taiwan as to whether the US can be relied upon to come to Taipei's defence.

Tsai addressed those concerns directly in a Facebook post on Wednesday.

"Recent changes in the situation in Afghanistan have led to much discussion in Taiwan," she wrote.

"It's not an option for us to do nothing on our own and just to rely on other people's protection," she said in the post.

She also said Taipei cannot rely on "momentary goodwill or charity of those who will not renounce the use of force against Taiwan" in a clear reference to Beijing.

China has ramped up military, diplomatic and economic pressure since Tsai's 2016 election, as she sees Taiwan as "already independent" and not part of its "one China".

Beijing's hawkish state media has delighted in the US pullout from Afghanistan, publishing a series of fiery editorials predicting that Washington will not come to Taiwan's aide in its hour of need.

Analysts have warned that Afghanistan and Taiwan are not easy comparisons.

"(Taiwan) is a core interest for the US in that it is a well-functioning democracy, loyal ally, (with) a capable military and directly standing up to America's most important competitor," Robert Kelly, an international relations expert at Pusan National University, wrote on Twitter.

"Afghanistan was on the fringe of US interests. A better analogue... is Israel."