The victims were illegally searching for gold and had dug deep in a riverbed in northeastern Afghanistan, according to a spokesman for the provincial governor.