Would-be thieves might want to think twice before committing a crime in one Chinese village - particularly if they have a sensitive nose.

Locals from a village in Guilin, Guangxi Zhuang Autonomous Region, caught a man in the act of attempting a theft according to Huanqiu, an affiliate of People's Daily.

But instead of handing him straight over to the police, the man was forced to stand in a septic tank that's filled with excrement.

Publicly shamed: A would-be dog thief was thwarted by villagers who dumped him in a septic tank

The shocking photos showed the humiliated man standing in the middle of the pit of excrement.

The foul-smelling concoction covered him up to his chest and he attempted to hide his face while villagers took his photograph.

Footage that surfaced on Weibo, China's equivalent of Twitter, along with the photographs even showed the man being dunked into the pit.

Huanqiu and several Chinese media reported that the man had been trying to steal a dog.

However, there were also social media reports that the man had been trying to steal a moped.

The shame will linger: The thief was kept in the smelly tank until local police arrived

Chinese web users expressed their disdain for the thief.

One said: 'They are already merciful. They didn't ask him to eat up all the excrement.'

Another added: 'He probably wouldn't dare steal anything for the rest of his life.'

It's not clear whether the man was eventually handed over to the police.

This is not the first time a dog thief has been given citizen's justice in Guangxi Zhuang Autonomous Region, which has a tradition of dog meat consumption.