But the new laws provide a firmer legal framework for controlling civil society and Western organizations, scholars say.

The most ambitious of the three, the national security law, solidifies Mr. Xi’s authority over national security by placing a central organ — likely to be the National Security Commission that Mr. Xi founded — in charge of all security matters. An April 23 article in People’s Daily, the official party newspaper, said the new draft of the security law reflected “General Secretary Xi Jinping’s spirit.”

Another reason Mr. Xi wants these laws is more abstract, scholars say. Party ideology no longer plays a central role in the lives of ordinary Chinese the way it did in the Mao era, so the party needs to promote and institutionalize the ideology by whatever means it can, including by writing it into law. That is especially true under Mr. Xi, who since the day he took office in 2012 has promoted old-school party ideology in a way not seen since the aftermath of the June 1989 crackdown on pro-democracy protests around Tiananmen Square in Beijing.

“The ideology is far thinner and holds the attention of the populace far less powerfully than before,” said Stanley B. Lubman, a scholar of Chinese law at the University of California, Berkeley. “As a result, the Chinese Communist Party needs more institutional support than before, and may need even more. This helps to explain the attention that law has recently been receiving since Xi came to power.”

The national security law explicitly mentions the need to teach China’s 1.3 billion people about the security and ideological needs of the state and the party. One clause commands institutions to “strengthen guidance on news, propaganda and public opinion about national security.”

“National security education will be included in the national education system and the public-servant training system to strengthen awareness among the entire populace,” the law says. “April 15 of each year will be set aside as national security education day.”

Legal analysts say the law is expected to be passed no later than March, when the National People’s Congress is to meet in Beijing. It could be passed sooner by the legislature’s standing committee, which also has the power to approve laws.