SINCE taking over as China’s leader in 2012, President Xi Jinping has shown an unusual preoccupation with challenges to the country’s security. A year later, to handle these, he set up a new national security commission and made himself chief of it. On July 1st the country’s parliament helped him further by adopting a new law on national security. It conveys the remarkable range of Mr Xi’s worries, with potential threats seen to be emanating from sources as diverse as the internet, culture, education and outer space. For its insight into the often opaque psychology of China’s elite, the bill will be welcomed—not so, however, by anyone with grievances against the Communist Party.

The law is a dense 6,900 characters of party-speak, with little in the way of detail (not even any specific punishments), but plenty of obligations such as to “defend the fundamental interests of the people” and take “all measures necessary” to protect the country. Many countries, including America and India, have laws on national security. But the variety of concerns covered in China’s is striking, as is the vagueness of its language (an exception is that April 15th will henceforth be observed as National Security Education Day). It may be followed by detailed regulations later. But it is unlikely that its key terms will ever be defined more precisely. To Mr Xi, vagueness is a useful weapon.

The law’s first article sets out the document’s intention: to “protect the political power of the people’s democratic dictatorship and the system of socialism with Chinese characteristics”. As always, the party’s grip on power and state security are treated as synonymous. Mr Xi’s role as national-security chief is primarily concerned with domestic threats. These include ones commonly regarded as national-security problems, such as terrorism. But they also include the challenges posed by free speech and liberal ideology.

Mr Xi has moved more decisively than his predecessor, Hu Jintao, to head off these perceived dangers, by rounding up numerous dissidents and tightening controls on the internet, as well as launching a “people’s war” on terror among Muslim Uighurs in the western region of Xinjiang. An important difference between an earlier draft of the law, released in April, and the final document is the greater prominence and space given to clauses related to the party’s monopoly on power. The bill (which replaces one passed in 1993) is one of five new laws currently in draft form or recently passed that may help Mr Xi strengthen the muscle of the security apparatus. The others are an anti-espionage law, passed last year, and laws currently in draft form on counter-terrorism, cyber-security and foreign NGOs.

The law makes a nod to one of Mr Xi’s pet causes, strengthening “rule of law”. Article 15 requires the state to “strengthen the mechanism for conducting checks on and oversight over the exercise of power”. That is not as it sounds. At an annual party meeting last October, Mr Xi set out a vision of the “rule of law” that clearly suggested it was to be used to keep the party in control, not to hamstring its power. On July 1st the legislature also declared that from next year, officials will have to swear loyalty to the constitution when taking office. That document supposedly protects freedom of speech, of the press, of assembly and of association. Yet its first article also specifies that China is a “people’s democratic dictatorship”. Mr Xi never seems to mention the nicer-sounding parts.

A “duty” to snitch

His anxieties have some justification. The party has long since lost its ideological legitimacy: the madness of the Maoist era from the 1950s to the 1970s put paid to that. Its economic legitimacy may also be waning: a slowing economy, rising prices and rising taxes make it harder to buy people off. Ordinary citizens are increasingly willing to express their grievances—protests involving thousands of people broke out in a suburb of Shanghai on June 22nd over rumours of a plan to build a chemical factory in the area, for example. The unrest lasted for several days until police began arresting dozens of participants. The rapid expulsion of air in recent days from the colossal bubble that is China’s stockmarket is also causing jitters in Beijing: millions of investors are people who have borrowed heavily to pour money into dodgy shares.

Under the new law, the duty of individual citizens to protect national security (for which read, not stir up trouble) is emphasised. This aspect is clearer than it was in the initial draft. Equivalent laws in most countries tell citizens what they must not do, such as leak state secrets. China’s law tells them what they are required to do, including reporting anything that may pose a threat. That is likely to add to anxiety among members of the country’s beleaguered community of political activists, who are already victims of vague legislation that has long been in force. In the southern city of Guangzhou, prosecutors are reportedly preparing a case against a blogger, Liang Qinhui, for “incitement to subvert state power”. His alleged crime was posting “sensitive” tweets. (One supposedly said he would “rather be an American dog than a Chinese pig”.)

Those alarmed by the new bill include foreign businesses. Some had already expressed concerns about the other security-related laws packaged with it, such as the draft counter-terrorism law, released in March, which demands that companies release encrypted data on request. The new law asserts China’s right to ensure that critical infrastructure and information systems are “secure and controllable”. Given China’s current anxieties about the use of foreign technology in computer systems it deems important, foreign firms worry that such innocent-sounding language could eventually result in stricter curbs on the use of their products. The draft law on foreign NGOs has similarly sown anxiety. It will require such organisations to register with the police.

There may be a little relief in Hong Kong. The document mentions the former colony’s obligation to uphold national security. But officials were quick to point out that the bill would not be applied in the territory, which has its own British-inspired legal system. Its exemption may not last forever. Chinese officials would like Hong Kong to pass its own law on national security; it says the territory is obliged to do so by its post-colonial constitution. But when Hong Kong’s government tried to pass such a law in 2003, massive demonstrations erupted that eventually caused the then chief executive, Tung Chee-hwa, to step down. Officials in the territory are unlikely to be in a hurry to try again (notwithstanding an unusually low turnout on July 1st for an annual parade in Hong Kong by supporters of greater democracy; a movement that appears to have lost steam in the face of China’s intransigence).

Elsewhere in China, the chill being spread by Mr Xi’s new laws is unlikely to dissipate soon. A senior legislator told reporters after the latest one was passed that China’s national security was “more complicated than at any other time in history”. The state news agency, Xinhua, said all of the 155 legislators who voted on the law were in favour, apart from one who abstained. At least Mr Xi need not worry about the loyalty of his parliament.