"A gunfight broke out between two groups attending the wedding in Andarab district late Sunday. Most of the dead were wedding guests aged 14 to 60 years old," Jaweed Basharat, the governor of Baghlan province was quoted as saying.
Baghlan and other provinces in north Afghanistan have witnessed insurgent attacks since the US-led invasion in 2001 that toppled the Taliban.
The police chief of Andarab, Col Gulistan Qasani, said hostility between the two groups involved in the gunfight had been simmering for many years.
"The clash broke out after a relative of a provincial police official was assassinated during the wedding party," Qasani said.
He said some 400 people had gathered at a private house for the wedding of a local cleric's son.