The Legislative Council (LegCo) of China's Hong Kong Special Administrative Region (HKSAR) approved the national anthem bill at the third reading debate on Thursday afternoon.
The bill was passed with the support of 41 lawmakers and one voting against.
The legislative meeting starting in the morning was once suspended for four hours because of the obstruction of opposition lawmakers, who repeatedly committed disruptive acts, even pouring foul-smelling liquid on the floor.
Given the chaos, LegCo President Andrew Leung Kwan-yuen put the bill to a vote shortly after the meeting resumed in the afternoon.
During a press briefing after the meeting, Leung said the disruptive acts were extremely irresponsible and strongly condemned the lawmakers involved.
HKSAR Chief Executive Carrie Lam expressed support for Leung's decisive action in her post on social media on Thursday night and stressed that the disorders during the national anthem legislation proved that it is impossible for the LegCo to pass the national security law in the foreseeable future.
Hong Kong can not tolerate intensifying violence, rising national security risks and continued social unrest, Lam said, noting that the decision of the national legislature to make national security laws for Hong Kong responded to the public appeal for stability.
Secretary for Constitutional and Mainland Affairs of the HKSAR government Erick Tsang Kwok-wai said the national anthem law will take effect on June 12, urging residents to respect the national anthem and not to commit insulting acts.
The legislation began in 2018 but was postponed for about a year due to violent incidents and riots last year and the filibuster by opposition lawmakers in the LegCo's House Committee.
China's National Anthem Law came into force in the mainland in 2017 and then the Standing Committee of the 12th National People's Congress adopted the decision to add the law to Annex III to the HKSAR Basic Law.
In accordance with Article 18 of the Basic Law, the national laws listed in Annex III to the Basic Law shall be applied locally by way of promulgation or legislation by the HKSAR.