Chinese President Xi Jinping warned self-ruled Taiwan on Tuesday that it will face the "punishment of history" for any attempt at separatism, offering his strongest warning yet to the island claimed by China as its sacred territory.

Taiwan is one of China's most sensitive issues and a potentially dangerous military flashpoint. China's hostility towards Taiwan has risen since the 2016 election of President Tsai Ing-wen from the pro-independence Democratic Progressive Party.

China suspects Tsai wants to push for formal independence, which would cross a red line for Communist Party leaders in Beijing, though Tsai has said she wants to maintain the status quo and is committed to ensuring peace. China has been infuriated by President Donald Trump's signing into law legislation last week that encourages the United States to send senior officials to Taiwan to meet Taiwanese counterparts and vice versa.

The United States does not have formal ties with Taiwan but is required by law to help it with self-defense and is the island's primary source of weapons.

In a speech at the end of China's annual session of parliament, Xi told the 3,000-odd delegates that China would push for the "peaceful reunification of the motherland" and work for more Taiwanese to enjoy the opportunities of China's development.