Afghan officials say 10 police officers and the wife of a police commander have been killed in an attack in the northern province of Zawzjan.

Mohammad Reza Ghafori, spokesman for the provincial governor, said the officers were ambushed on February 24 as they were coming out of a mosque in the Darzab district.

A local police commander was among the dead and his wife was also killed when she rushed to the scene, Ghafori added.

Brigadier General Rahmatullah Turkistani, the provincial police chief, said four militants were killed and six others wounded in retaliatory firing.

Ghafori blamed the attack on Islamic State (IS) militants, but the Taliban claimed responsibility.

IS-linked militants have been active in eastern Afghanistan, but have recently begun operating in the north of the country as well. The Taliban frequently target officials and security forces across Afghanistan.