Taipei raised its travel warning for China on Thursday, telling Taiwanese not to go to the country unless absolutely necessary following a threat from Beijing last week to execute those deemed "diehard" Taiwan independence supporters.

Liang Wen-chieh, spokesperson for Taiwan's Mainland Affairs Council, told reporters the raised travel warning also applied to the Chinese-run cities of Hong Kong and Macau.

China, which views democratically governed Taiwan as its own territory, has made no secret of its dislike of Taiwanese President Lai Ching-te, whom it views as a "separatist," and staged two days of war games after he took office last month.