Pro-democracy activists in Hong Kong began to quit, fearful of the new law, and the punishment it allows.
Here is some of the reaction from them, other governments, and campaign groups.
Secretary-general and founding member of pro-democracy group Demosisto, and key figure in 2014 Umbrella movement
"It [the law] marks the end of Hong Kong that the world knew before," said Mr Wong, after announcing he was quitting Demosisto.
"From now on, Hong Kong enters a new era of reign of terror, just like Taiwan's White Terror, with arbitrary prosecutions, black jails, secret trials, forced confessions, media clampdowns and political censorship.
"With sweeping powers and ill-defined law, the city will turn into a secret police state. Hong Kong protesters now face high possibilities of being extradited to China's courts for trials and life sentences."
Founding chairman of Demosisto, former student leader
On Facebook, Mr Law said the law marked the start of a "bloody cultural revolution".
But, despite quitting Demosisto, he said he would continue to fight for democracy "in a personal capacity".
He added on Twitter: "Stay strong, my friends. Hong Kong people will not give up."
Hours after Mr Law, Mr Wong, and others quit Demosisto, the group announced it would disband entirely. "We will meet again," it said.
Minutes after the law was passed, the group said on Twitter it was disbanding in Hong Kong, but would continue its work overseas. It reportedly has branches in Taiwan and the UK.
Its Hong Kong spokesman, Baggio Leung - who was briefly a member of parliament in 2016 - is also leaving the group.
But the group said the end of operations in Hong Kong did not mean its fight was over. "Today is not the end point," it said.
"From now on, China will have the power to impose its own laws on any criminal suspect it chooses," said the head of Amnesty's China team, Joshua Rosenzweig.
"The fact that the Chinese authorities have now passed this law without the people of Hong Kong being able to see it tells you a lot about their intentions.
"Their aim is to govern Hong Kong through fear from this point forward."
"The move severely impacts Hong Kong society's freedom, human rights and stability," said cabinet spokesman Evian Ting, as the Taiwanese government warned its citizens of an increased risk in visiting Hong Kong.
"The government strongly condemns it and reiterates its support for the people of Hong Kong as they strive for democracy and freedom."
Hong Kong government leader, speaking before the law was passed
"There is no need for us to worry," Ms Lam said in May.
"In the last 23 years, whenever people worried about Hong Kong's freedom of speech and freedom of expression and protest, time and again, Hong Kong has proven that we uphold and preserve those values."
"The core values in terms of the rule of law, the independence of the judiciary, the various rights and freedoms enjoyed by people, will continue to be there," she added.
That post exemplifies the root of the problem - a historical legacy of centuries of propaganda based on the premise of European racial supremacy. It portrays the white colonial master that is the savior to the ever thankful poor black slave. Thank God, I’m an emancipated African - and I don’t worship at the feet of white gods - the Queen or the Governor, who are simply relics of outmoded colonialism built on the tenets of racist institutions of white supremacy that colonized and enslaved Africans for centuries.
As Bob Marley said, “Emancipate yourself from mental slavery,” because sometimes, “shit is just shit!”