China's President Xi Jinping arrives for the second plenary session of the National People's Congress at the Great Hall of the People in Beijing. (Damir Sagolj/Reuters)

China’s intelligence service, the Ministry of State Security, offers a snapshot of the political intrigue taking place within the regime of President Xi Jinping.

The MSS has replaced two vice ministers within the past four years, after reports of political infighting and scandal. The current minister is said to be a figurehead, with the real power held by a hard-line Xi loyalist who was drafted last year from the party’s discipline commission.

This shake-up within the intelligence service mirrors China’s broader political turmoil, stemming largely from Xi’s anti-corruption campaign. This effort, which began soon after Xi became Communist Party chief in 2012, has targeted prominent military, security and political figures — and created what many China-watchers say is a backlash against Xi.

Recent newspaper headlines convey the unrest that’s swirling in China: “Grumbling mounts in China, even in the party. Is President Xi losing his grip?” asked a Post news article this week. “Anonymous Call for Xi to Quit Rattles Party Leaders in China,” the New York Times reported. But experts caution that despite such talk, Xi’s hold on power probably remains firm.

The signs of internal discord come against the background of Xi’s attempts over the past four years to purge corrupt or disloyal officials. His instrument has been the Central Commission for Discipline Inspection, headed by Wang Qishan, a member of the Politburo’s standing committee who is said to be Xi’s closest adviser.

Several independent China analysts offered an account of the upheaval within the MSS, based largely on Chinese and foreign media reports. A CIA official, asked to comment, declined.

The security ministry’s recent troubles came to light with the removal of a vice minister, Lu Zhongwei, in 2012. Analysts believe he was purged after the reported arrest that year of his executive assistant, who was accused of spying for the CIA. China-watchers say that more than 350 people were investigated after the incident.

The next top MSS official to fall was Vice Minister Ma Jian. He was a solid operations officer who had been in charge of counterespionage since 2006. But Ma had close ties to Chinese business executives, such as real estate tycoon Guo Wengui, who were said to be under investigation by the discipline commission.

Ma was arrested in January 2015. When investigators swept his apartments, they are said to have found transcripts of wiretaps made secretly of Xi and other party leaders. Guo left China and may now be living in the United States, China-watchers say. In an interview last year with the South China Morning Post, Guo denied connection to any allegation involving Ma.

With Ma’s fall, the dominant figure remaining at the security ministry was Minister Geng Huichang, who had held the top post since August 2007. Though he remains minister, he lost the more important title of MSS party secretary last year, and he is expected to retire at 65 later this year.

The new strongman at the MSS is Chen Wenqing, who was appointed MSS party secretary last year. He’s an ex-police chief and a party disciplinarian. Experts say his new role in intelligence illustrates Xi’s attempt to control power.

Chen’s links with Xi’s camp are said to have been formed in Fujian Province in eastern China. Xi was a top party official there from 1985 to 2002. When Chen arrived in Fujian in 2006 as secretary of the provincial discipline committee, he bonded with Xi’s allies.

Chen was brought to Beijing as vice secretary of the central discipline commission in 2012. He soon became a close associate of Wang Qishan, who made the discipline commission the instrument of Xi’s anti-corruption drive.

Behind China’s turmoil lies the purge of Zhou Yongkang, who oversaw intelligence, police and law enforcement and was seen as the godfather of China’s security establishment. Zhou retired from the Politburo in 2012 and was convicted of bribery last year. Given Zhou’s connections throughout China’s power structure, this move set off shock waves that continue to this day.

One example of the fallout from Zhou’s ouster is the case of Liang Ke, who since 2008 had headed Beijing’s state security bureau, the MSS’s office in the capital. He was arrested in 2014 by the discipline commission; China-watchers say he was suspected of tapping Xi’s phones at Zhou’s urging.

“The opposition to Xi has been an existential crisis for the regime, and that’s why they’ve had to spend so much time cleaning it up,” says Christopher Johnson, a former CIA China analyst who’s now a senior adviser at the Center for Strategic and International Studies. But he cautions: “Reports of Xi’s demise are badly overstated.”

Read more from David Ignatius’s archive, follow him on Twitter or subscribe to his updates on Facebook.