The Taliban have killed 13 pro-government fighters in northern Afghanistan, ambushing them as they were on their way to take part in an operation against the insurgency, officials said Sunday.

The attack on the fighters, part of a local militia working with the government, took place Saturday afternoon in the volatile Chimtal district of northern Balkh province, some 40 kilometres from the provincial capital Mazar-i-Sharif.

It underscored rising insecurity in the war-torn country as the resurgent Taliban step up their assaults, with government forces struggling to contain them.

"13 local militia forces have been shot dead by Taliban insurgents as they were heading for an operation against the militants in Chimtal," Munir Farhad, spokesman for the provincial governor of Balkh told AFP.

"All of them were killed ... They were young forces," Farhad said, adding they were investigating the cause of the attack.

Sarwar Hussaini, police spokesman for northern Afghanistan confirmed the ambush and the death toll.

The Taliban, who have intensified their attacks on pro-government forces since launching their annual so-called "spring offensive", claimed responsibility for Saturday's attack.

Afghan security forces, beset by killings, desertions and non-existent "ghost soldiers" on the payroll, have been struggling to beat back insurgents since US-led NATO troops ended their combat mission in December 2014.

In April, northern Balkh province witnessed one of the deadliest attacks in Afghan history on a military base near Mazar-i-Sharif, where gunmen and suicide bombers killed around 150 soldiers.

Local militias have been formed under the authority of the interior ministry to help the strained security forces.

Saturday's attack comes at a time of intensified violence and when the United States is actively considering sending more troops to Afghanistan. American military commanders in Afghanistan have requested thousands of extra boots on the ground.

US troops in Afghanistan now number about 8,400, and there are another 5,000 from NATO allies, a far cry from the US presence of more than 100,000 six years ago. They mainly serve as trainers and advisers.