BEIJING — Police say a villager in southwest China killed his parents and then 17 neighbors in an attempt to cover up his crime, the official Xinhua News Agency reported Friday.

An investigation found that Yang Qingpei argued with his parents over money on Wednesday evening and killed them, Xinhua said. Fearing he would be identified as the killer, he then murdered 17 neighbors in the village of Yema, it said, citing police in southwestern Yunnan province where the village is located.

Xinhua didn’t say how Yang, who is 26 or 27, allegedly killed the villagers.

He was arrested in the provincial capital of Kunming, about 200 kilometers (120 miles) away, on Thursday, a few hours after the bodies from different households were discovered.

The deaths are one of the bloodiest mass slayings in recent years in China, where deadly random attacks on schools and public transport have been blamed on people bearing grudges against their families, neighbors or society in general.

Because firearms are tightly controlled in China, mass killings are usually carried out with knives, poison, homemade explosives or by arson.