The powerful explosion in Faryab province’s Almar district also wounded at least 38 people, said Abdul Satar Barez, the acting provincial governor.
Both civilians and Afghan trops were among the casualties, he added.
Deputy provincial police chief Baryalia Basharyar said the “target of the attacker were military forces that were present in the area but the majority of the victims were innocent civilians.”
Barez also said he feared the final death toll may be higher as many among the wounded were in critical condition.
No group immediately claimed responsibility for the attack.
Taliban insurgents have stepped up their attacks on Afghan soldiers and police in recent months. U.S. and NATO troops formally ended their combat mission at the end of last year, leaving Afghan forces in charge of the security in the country.