A prominent activist who called himself the Ultra Vulgar Butcher as he mocked and pressured Chinese officials has been given an eight-year prison sentence for subversion, the harshest sentence handed down in a sweeping crackdown on rights campaigners.

Key points: Wu focused his campaign on local officials who had done wrong

Wu focused his campaign on local officials who had done wrong The court said Wu made remarks online that "attacked state power"

The court said Wu made remarks online that "attacked state power" Hundreds of lawyers, activists and others were detained in the nationwide crackdown

The Tianjin No 2 Intermediate People's Court handed down the sentence after finding activist Wu Gan guilty of subverting state power. Wu will appeal the sentence, his lawyer Ge Yongxi said.

Wu had become known among rights advocates and lawyers for his attention-grabbing campaigns.

In one, he posed for online portraits brandishing knives that he said he would use to "slaughter the pigs" among local officials who had done wrong.

In court on Tuesday, Wu struck an irreverent note in his remarks following the sentence, saying he was "grateful to the party for granting me this lofty honour," according to Mr Ge, who was in court.

"I will remain true to our original aspiration, roll up my sleeves and make an extra effort," Wu said, playing on well-known phrases Chinese President Xi Jinping often uses to exhort Communist Party officials to improve their work.

Wu was among the first activists and lawyers caught up in an intense crackdown by authorities that began in 2015.

His secretive one-day trial was held in August after a detention of more than two years.

Wu is known among rights advocates and lawyers for his attention-grabbing campaigns. ( AP: Butcher Pig Slaughter Studio )

Activists like Wu focused on individual cases instead of challenging Communist Party policy at the national level, making them a greater headache for local officials than for Beijing.

But their ability to organise and bring people out on the ground apparently made authorities nervous.

"With extraordinary courage and disdainful words, Wu Gan set the tone for this so-called 'trial' against him," said his friend and fellow Chinese activist Wu Yuren.

"It will inspire more and more people to stomp on this Government that seems powerful yet doesn't have the authority of the people.

The court said in an online statement that Wu Gan had made many remarks online that "attacked state power".

It accused him of hyping cases that "discredited state organs" by organising illegal public gatherings, causing trouble, and making abusive comments online about other people.

It said such actions were part of a series of criminal activities seeking to "overthrow state power and the socialist system".

Hundreds of lawyers, activists and others were detained in a coordinated nationwide sweep that sent a chill through China's activist community. Many were later released.

AP