Angry villagers in Afghanistan have stoned a man to death and riddled his body with bullets, believing he set off a bomb on a bus that killed 18 members of a wedding entourage, officials said.

The roadside blast ripped through a minibus carrying wedding guests in the central Ghazni on Sunday. The majority of those killed were women.

Villagers hunted down a local man who was found hiding in a chicken coop next to his home, with the bomb's remote control apparently found nearby, Ghazni deputy provincial governor Mohammad Ali Ahmadi told AFP on Monday.

A crowd of more than 100 people dragged the man out, beat him with sticks and shovels and then stoned him with rocks until he was dead.

"They [then] shot about 200 bullets at his body," Ahmadi added.

Asadullah Insafi, the Ghazni province deputy police chief, gave a similar account of the incident.

Locals said the man, whom they accused of being a Taliban fighter, took responsibility for the bombing and tipped them off about a second device that he had planted nearby.

The claims could not be verified.