Three people in northern China have been detained on suspicion of stealing a corpse to sell as a bride in the ancient Chinese rite of ghost weddings.

The practice joins single people who have died for a belated marriage in the afterlife.

The main suspect, a man aged 72, said he had heard about the death of a young woman in a nearby village in Shanxi province and thought of selling the corpse to relatives of single dead men, the official Xinhua News Agency reported.

The main suspect and two accomplices pretended to be relatives of the woman and negotiated a sale price of 25,000 yuan (£2,540) with a buyer, Xinhua cited police in Ruicheng county as saying.

While they were raiding a village tomb for the body last weekend, their plot was scuttled by villagers who caught them in the act and alerted police.

The practice of afterlife matrimony extends back centuries and occasionally happens in poor rural areas where people are superstitious and believe in an afterlife, said Xu Keqian, a professor of Chinese language and culture at Nanjing Normal University.

The villagers hope that marrying off a single person after he or she has died will ward off bad luck associated with dying while still single, Prof Xu said.

The male or female corpse is reburied in the tomb of the counterpart in a quasi-wedding ceremony to the accompaniment of gongs and drums, followed by a funeral service, he added.

In some cases, two corpses were married because they had been a betrothed couple who died before their wedding.