Three men have been arrested in rural China after being caught attempting to raid the tomb of a woman who died single in order to sell her corpse to the family of a deceased, single young man, to be used in a practice known as a “ghost wedding.”

The men, arrested near the city of Linfen, allegedly told Chinese police that they had been offered 25,000 Yuan—nearly $4,000—for the woman’s body. The men allegedly claimed to be relatives of the woman, which would allow them to sell her body to the family of a recently-deceased man of a similar age for such a price. They had heard, the main suspect told police, that a young women had died in the area and took the opportunity to find a family with a young man who had recently died. Upon finding the family, they offered her as a bride to the dead young man.

Villagers caught the men making noise in the cemetery and called police.

The woman’s body was to be used in a practice called a “ghost wedding,” which has diminished in popularity in rural Chinese areas in recent years but remains an act that some believe necessary for the peace of their relatives’ souls. A young, single person who dies is said to be lonely in their afterlife and cannot become an ancestor, leading the person’s ghost to seek out their living relatives and haunt them. To prevent both the deceased’s grief and that of the haunted family, the family finds a young, single person who has died of the opposite sex and organizes a “wedding.” The ceremony requires most of the overtures seen in a wedding of the living, and the woman is dug out of her grave and re-buried with her new husband.

As NBC explains in a 2013 piece on the practice:

They are performed much like regular weddings, except they usually involve a burial ceremony. Relatives and friends of the deceased eat and drink. Sometimes entertainment is provided. After the wedding, the two families typically socialize together, especially on major holidays. Some believe their bond can be closer than that of in-laws of living couples.

As a spiritual practice, it was banned by the Communist Party in 1949, creating a black market for grave robbers serving those who wish to marry their dead.

As NBC explains, because men are more likely to die young while engaged in dangerous occupations like mining and construction, the price of a young ghost bride is extremely high. The brides are preferred as close to life as possible, and this has led some, the article notes, to “even perform plastic surgery on corpses and dye their hair to make them look younger, so they could fetch higher prices.”

The Daily Mail notes that the practice has been occasionally seen outside of China, such as the case of South Korean actress Jeong Da Bin, who was married four years after committing suicide.