Authorities in southwestern China have annulled the marriage of a 12-year-old girl sold to a 28-year-old man by her father, reports said Friday.

The girl had been living with ailing grandparents in a poor village in southwestern Guizhou province while her divorced father, who had custody of her, worked elsewhere, said the web portal Zhongguoshikewang.

His ex-wife, who was raising their younger daughter, discovered the marriage while visiting for a funeral and reported it to police.

The marriage had been arranged through a relative for an undisclosed sum.

Local authorities declared the relationship invalid because the girl had not reached marriageable age, the China News Service said on its website.

They were arranging for the girl to finish her studies, and planned to give her family economic assistance.

The story was reported on several Chinese web portals and linked to by users of Sina Weibo, a Chinese version of Twitter, where posters expressed a mixture of anger and sadness.

One said the girl's father "has no humanity" and did not deserve to be a parent.

Tens of millions of "left-behind children" live with elderly relatives and under little supervision in China's countryside because their parents have sought better livelihoods elsewhere but cannot afford to bring them along.

The child bride incident reflected the "hardships faced by left-behind children", the Zhongguoshikewang report said.

Pictures showed her grandparents' dilapidated wooden home propped up by a series of long poles, its roof and sides patched up with sheets of corrugated steel.

Elsewhere in Guizhou, in southwest China, five boys whose parents had migrated for work were found dead in a dumpster in November, having suffocated after lighting coal in the enclosed space in the cold of winter.