4-5 minutes - BBC
The bill - which now passes to China's senior leadership - has caused deep concern among those who say it could end Hong Kong's unique status.
It could also see China installing its own security agencies in the region for the first time.
The move has already sparked a new wave of anti-mainland protest.
Clashes broke out again on Wednesday, as Hong Kong's parliament debated a different proposed law, which would make it a crime to disrespect the Chinese national anthem.
Hundreds of people were arrested. Security remains high on Thursday, as the debate in the Legislative Council continues.
On Wednesday, US Secretary of State Mike Pompeo said developments in Hong Kong meant it could no longer be considered to have "a high degree of autonomy" from mainland China.
That meant that Hong Kong no longer merited being treated differently from the mainland under US law.
The declaration could have major implications for Hong Kong's trade hub status and is likely to anger Beijing.
Banning subversionThe National People's Congress (NPC) is meeting in Beijing this week after a two-month delay because of the pandemic.
While it did have the chance to vote on the bill - referred to as the Draft Decision - it only ever approves legislation put to it by the government so there was no chance this bill would not be approved.
The bill now passes to the Standing Committee of the Communist Party and could become law by August.
The full details of the bill are not yet known, but it would criminalise:
- secession - breaking away from the country
- subversion - undermining the power or authority of the central government
- terrorism - using violence or intimidation against people
- activities by foreign forces that interfere in Hong Kong.
That means China could potentially have its own law enforcement agencies in Hong Kong, alongside the city's own.
The authorities in Hong Kong insist the law is essential to tackle growing violence and "terrorism", and that the territory's residents have nothing to fear from it.
Critics fear it could lead to Hong Kongers being prosecuted - even retroactively - for criticising their or the mainland's leadership, joining protests or exercising their current rights under local laws.
Why did China do this?Hong Kong was handed back to China from British control in 1997, but under a unique agreement - a mini-constitution called the Basic Law and a so-called "one country, two systems" principle.
They are supposed to protect certain freedoms for Hong Kong: freedom of assembly and speech, an independent judiciary and some democratic rights - freedoms that no other part of mainland China has.
Under the same agreement, Hong Kong had to enact its own national security law - this was set out in Article 23 of the Basic Law.
But its unpopularity means it has never been done - the government tried in 2003 but had to back down after protests.
Then, last year, protests over an extradition law turned violent and evolved into a broader anti-China and pro-democracy movement.
China is keen to avoid a repeat of that unrest.