Chinese President Xi Jinping speaks before the Group of 20 Summit in Hangzhou, China, on Sept. 3. (Aly Song/AFP/Getty Images)

Chinese President Xi Jinping won a key victory Thursday in his battle to consolidate power and clean up the ruling Communist Party from within.

Yet he still faces a desperately difficult battle.

After a four-day meeting of 348 Communist Party leaders in Beijing, Xi was elevated to the status of a “core” leader, an honorary title but one that appears to strengthen his hand ahead of a key party congress next year.

The meeting called on party members to “closely unite” around the leadership, “with Comrade Xi Jinping as the core,” an official communique said. It added that new rules were adopted to regulate officials’ behavior and tighten party discipline.

But the emphasis on unity and loyalty, experts said, also is revealing in itself, reflecting Xi’s frustration at his inability to force through his agenda in the face of growing resistance and resentment from within the party itself, coupled with an increasingly cynical public mood.

“China has a saying that whatever you make a noise about is what you lack,” said Zhou Xiaozheng, a sociology professor at Renmin University of China in Beijing. “It is obvious that all this noise about loyalty is because there is a lack of loyalty.”

Xi, who heads the party and the military, has worked constantly to consolidate power since taking office in 2013.

This week’s plenum was another step in that process, setting the tone for a party congress in 2017 aimed not only at granting him five more years in power but at electing those who would stand beside him on the seven-member Politburo Standing Committee.

The plenum also appeared to back Xi’s campaign to clean up the party from within and battle corruption.

“Together we must build a clean and righteous political environment, and ensure that the party unites and leads the people to continuously open up new prospects for socialism with ­Chinese characteristics,” the ­communique said.

The term “core” leader was first coined by strongman Deng Xiaoping, who conferred it posthumously on Mao Zedong, as well as on himself and his effective successor, Jiang Zemin. It is supposed to mean that their authority should not be questioned.

It was not a title that Xi’s predecessor, Hu Jintao, was ever granted.

“Xi has achieved his minimum goal,” said a Chinese political expert in Beijing, who spoke on the condition of anonymity for fear of problems with authorities. “His notional authority has been established. But how substantial it is has yet to be observed.”

In the months to come, it will become more apparent whether Xi has also been successful in promoting loyalists within party ranks, paving the way for the 2017 congress, he said.

Xi’s elevation to the “core” leadership was not a surprise. Indeed, in the weeks leading up to the plenum, state media issued a steady drumbeat of articles underlining the need for loyalty to the leader and to the party. China’s people, the media cited one poll as showing, are demanding strong central leadership under the “pioneering figure” of Xi.

The emphasis on strong leadership partly reflects the scale of the task Xi has set himself: to clean up a deeply corrupt Communist Party whose moral atrophy threatens the very existence of the one-party state and to stop the rot without bringing the whole structure crashing down.

The government announced Monday that more than 1 million officials, out of 88 million party members, have been investigated in the past three years during an intense campaign against corruption.

State media has railed against lazy, foot-dragging officials, complaining that some were too scared to do their jobs for fear of being accused of taking bribes, while others were unwilling to act unless the kickbacks resumed.

And those who complain or are nostalgic for the good old days? Well, they are just “rotten with corruption,” the People’s Daily wrote.

Xi’s signature anti-corruption campaign is both an attempt to clean house and restore public trust and a tool to be used against opponents to scare them into submission.

But on both counts, it is also a double-edged sword: It has earned him many enemies within the party, experts said, and exposed to the general public just how deeply corruption has penetrated.

“Xi is fighting on his own on a rotten stage,” said Zhang Lifan, a historian and prominent critic of the president. “He has hit and hurt everybody; he has insulted everyone. In their hearts, [party members] want to drag him down.”

Nor has the anti-corruption campaign reassured the general public. Indeed, the constant drip of news about crooked officials may have had the opposite effect.

“People have become burned out,” said Hu Xingdou, a governance expert at Beijing Institute of Technology. “They are not fools. They can see very clearly there are far more corrupt officials at large who have not been caught.”

A poll released this month by Pew Global Research showed that political corruption was the Chinese public’s top concern: 49 percent said corrupt officials were a very big problem — a rise of five percentage points from the year before. Another 34 percent called it a moderately big problem.

That the anti-corruption ­campaign’s high-profile victims have been from rival factions within the party — and never from Xi’s own inner circle — has not gone unnoticed.

“During the first year of the anti-corruption campaign, Xi Jinping was very popular,” said Willy Wo-Lap Lam, a professor at the Chinese University of Hong Kong. “But after seeing the identities of the people he has pulled down — most of them were his political enemies — a groundswell of cynicism has set in.”

Corruption had seemed ­manageable when the economy was booming: At least everyone was getting richer, even if some were doing it faster than others. But as growth has slowed, distrust has grown, said Renmin University’s Zhou.

“People are numb about the anti-corruption campaign now,” he said. “They just think: ‘Okay, you higher party people fight behind closed doors. We don’t want to know. How corrupt you are has nothing to do with the common people.’ ”

In many ways, Xi faces a set of problems similar to those confronting then-Soviet leader Mikhail Gorbachev in the 1980s, including a slowing economy and a corrupt, truculent party opposed to reform. And the Soviet example is never far from his mind, experts said.

The “Soviet collapse teaches the [Communist Party of China] lessons in party leadership,” the nationalist Global Times tabloid reminded its readers this week, citing Su Wei, a professor at a Communist Party school in Chongqing. It stressed a need for greater discipline.

But while Gorbachev’s policy of glasnost tried to harness openness and transparency to clean house, Xi has moved in the opposite direction, clamping down on the media, civil society and the legal profession.

“The new Long March for the party is about self-rectification and self-correcting,” said Jude Blanchette, an expert in Chinese politics at the Conference Board in Beijing. “Self is an important word. This is about fixing ­ourselves.”

Congcong Zhang contributed to this report.