Taiwan will provide the people of Hong Kong with "necessary assistance," President Tsai Ing-wen has said, after a resurgence in protests in the Chinese ruled territory against newly proposed national security legislation from Beijing.

Taiwan has become a refuge for a small but growing number of pro-democracy protesters fleeing Hong Kong, which has been convulsed since last year by protests.

Hong Kong police fired tear gas and water cannon to disperse thousands of people who rallied on Sunday to protest against Beijing's plan to impose national security laws on the city.