China’s former internet chief, Lu Wei, pleaded guilty in court on Friday of taking millions of dollars in bribes, after prosecutors accused him of abusing his power in various government posts over 15 years.

The ruling Communist Party’s anti-corruption watchdog said in November that Lu, who once headed the powerful Cyberspace Administration of China, was under investigation for serious discipline breaches.

He had since been expelled from the party, paving the way for his prosecution and making him one of a number of senior officials caught up in a sweeping anti-graft campaign under President Xi Jinping.

Prosecutors at an intermediate court in the Zhejiang province city of Ningbo said that between 2002 and 2017, Lu received illicit assets from government units or individuals worth more than 32 million yuan ($4.6 million), the official Xinhua news agency said.

“Lu Wei also made a final statement to the court, and admitted guilt and expressed regret,” Xinhua said.

The news agency said a verdict would be announced later, though Lu, 58, is almost certain to be found guilty, as courts are controlled by the party and will not challenge the accusations against him.

At the height of his influence, Lu, a colourful and often brash official by Chinese standards, was seen as emblematic of increasingly pervasive internet controls.

He had worked his way up through the Xinhua news agency before becoming head of propaganda in Beijing and then moving to internet work in 2013. He later became a deputy propaganda minister.

Xi has presided over a sweeping corruption crackdown since coming to power in 2012 and has vowed to target both “tigers” and “flies”, a reference to top officials and ordinary bureaucrats.

The campaign has seen the jailing or punishment of hundreds of thousands of officials and also brought down dozens of senior party and military officials.

The crackdown has not just been focused on issues like bribery and using public money to fund lavish lifestyles. It has also taken aim at those whose political loyalty is found lacking or who express doubt about party policies.

China has rejected criticism that the anti-graft campaign is as much about settling political scores as about stamping out genuine criminal acts.