Image copyright AFP Image caption Not since the days of Mao Zedong (right) has a campaign on the scale of Mr Xi's been seen

Since becoming China's leader in 2012, Xi Jinping has overseen a vast and ruthless anti-corruption drive in which more than a million officials have been disciplined.

A BBC study has found that more than 170 ministers and deputy minister-level officials have been sacked and many jailed under Mr Xi, accused of charges such as corruption, misconduct and violation of party discipline.

It has been described by some as a massive internal purge of opponents, on a scale not seen since the days of Mao Zedong, in whose Cultural Revolution many top officials were purged.

How extensive is the campaign?

The most noticeable departure from tradition has been the breaking with many unwritten party conventions since Mao's time. The prosecution of so many national-level officials has been notable - in recent decades prominent figures would usually have been quietly retired.

But in the last five years, 35 members (full and alternate) of the Chinese Communist Party's powerful Central Committee have been disciplined. That is as many as in all the years between 1949 and 2012.

Who has been targeted?

Based on official data, a staggering 1.34 million officials at high and low levels - the so-called "tigers and flies" - have been brought down by corruption and disciplinary charges during President Xi's first five years in office.

No walk of life has been spared - those felled range from village chiefs and factory managers to government ministers and generals.

The so-called "great purge" goes right to the very top of government - the biggest scalp so far was once the third most senior leader in China, Zhou Yongkang. He had been in charge of the vast internal security apparatus until he retired.

Sun Zhengcai, who was sacked as Chongqing party secretary, was only the fourth sitting politburo member ever to be expelled from the Communist Party. Promoted before Xi Jinping took office, Mr Sun, 54, was the politburo's youngest member and had been tipped for the very top.

Zhou Yongkang is the most senior official felled so far. Until he retired in 2012 he was the third most powerful politician in China. In 2015 he was jailed for life for bribery, abuse of power and disclosing state secrets.

is the most senior official felled so far. Until he retired in 2012 he was the third most powerful politician in China. In 2015 he was jailed for life for bribery, abuse of power and disclosing state secrets. Abruptly removed from his post in July, Sun Zhengcai is the most senior serving official to be caught by President Xi's purge. Only the fourth sitting politburo member to ever be expelled from the Party.

is the most senior serving official to be caught by President Xi's purge. Only the fourth sitting politburo member to ever be expelled from the Party. Xu Caihou was among highest-ranking military until he retired in 2013. He was investigated as part of a "cash for ranks" probe and ultimately expelled from the party and prosecuted. He died of cancer in 2015.

was among highest-ranking military until he retired in 2013. He was investigated as part of a "cash for ranks" probe and ultimately expelled from the party and prosecuted. He died of cancer in 2015. Guo Boxiong served alongside Xu. In July 2016 he became the highest-ranking military official prosecuted since the end of the revolution in 1949. He was sentenced to life in prison for bribery.

served alongside Xu. In July 2016 he became the highest-ranking military official prosecuted since the end of the revolution in 1949. He was sentenced to life in prison for bribery. Ling Jihua was a trusted adviser of Hu Jintao but was swiftly demoted under Xi. After a scandal that began when his son died "in a state of undress" in a Ferrari crash, he was jailed for life for bribery in 2016.

Nearly 70% of the party's ruling Central Committee members will be replaced with new faces at the current congress although in the majority of cases alleged corruption or other transgressions will not be the reason - age will be.

An unwritten party rule currently sets the retirement age at 65 for Central Committee members.

Has the army been spared?

No area has been more radically restructured under President Xi than the military, which he swiftly set about comprehensively reorganising and modernising.

Image copyright Reuters

More than 60 generals have been investigated and sacked in the drive to introduce a Western-style joint command and promote young officers to top positions.

Even as the delegates started to gather in Beijing for the current party congress, the pace of the campaign showed no signs of slowing down. Two top generals, Fang Fenghui and Zhang Yang, disappeared from public view as recently as last month, and a series of new high-level investigations have been announced.

What is Xi's goal?

The five-yearly congress in Beijing is expected to see the president remain as party chief and bring in a new leadership team, helping to entrench his already considerable power.

If things go to plan for President Xi, he should be able to get many of his loyalists into key positions. Since he took office a number of his allies have been promoted. Here are some of the biggest gainers.

Li Zhanshu was party chief in a county neighbouring Mr Xi's early in their careers. In 2015 he visited Moscow as Mr Xi's "special representative". Has played a leading role in maintaining strong relations with Russia.

was party chief in a county neighbouring Mr Xi's early in their careers. In 2015 he visited Moscow as Mr Xi's "special representative". Has played a leading role in maintaining strong relations with Russia. Chen Min'er is one of the "New Zhijiang Army", the group of now senior CPC figures who worked under Mr Xi when he was party secretary in Zhejiang. Chen replaced the disgraced Sun Zhengcai in Chongqing.

is one of the "New Zhijiang Army", the group of now senior CPC figures who worked under Mr Xi when he was party secretary in Zhejiang. Chen replaced the disgraced Sun Zhengcai in Chongqing. Another of the so-called "New Zhijiang Army" is Cai Qi . Before being summoned to the capital his popular blog had more than 10m social media followers.

. Before being summoned to the capital his popular blog had more than 10m social media followers. Said to be President Xi's top foreign policy aide, Wang Huning has been labelled "China's Kissinger" by a leading South Korean newspaper. He also advised former presidents Hu and Jiang.

has been labelled "China's Kissinger" by a leading South Korean newspaper. He also advised former presidents Hu and Jiang. President Xi described his key economic adviser Liu He as "very important to me" when introducing him to President Obama's National Security Adviser in 2013. Mr Liu has an MA in public administration from Harvard.

Who ends up in the party's Politburo Standing Committee, China's top decision-making body which currently has seven seats, will show exactly how powerful he has become. Its members - and those of the 25-seat Politburo - will be revealed on 25 October once the congress ends.

But analysts say Mr Xi, along with anti-corruption chief Wang Qishan, a key ally, has used the clean-up campaign to help shape who China's new leaders will be.

The country's Communist Party has for decades ruled by consensus, but analysts say President Xi is rewriting party rules and concentrating power in his own hands.

Critics accuse him of encouraging a cult of personality. They point to the fact that most of the top officials who have been disciplined have been supporters of his opponents, or former presidents Jiang Zemin or Hu Jintao.

President Xi's supporters say the anti-corruption drive is needed to restore the ruling party's credibility as the president pursues his dream of a more prosperous and powerful China which will soon overtake the US as the world's largest economy.

Research and production by BBC News, BBC Monitoring, BBC Chinese and BBC Visual Journalism.