KUNDUZ -  Militants killed 18 Afghan soldiers - including some who were beheaded - after storming army outposts in the remote mountainous northeast, officials said Monday, in a major attack before the Taliban’s traditional spring offensive.

The pre-dawn raid in the Jurm district of Badakhshan province on Friday marks a grim setback for Afghan forces, set to face their first fighting season in which they battle insurgents without full NATO support.

The militants have stepped up attacks on government and foreign targets since Washington backpedalled on plans to shrink the US force in Afghanistan this year by nearly half.

“Eighteen Afghan soldiers were martyred and eight of them were beheaded” on Friday, provincial spokesman Naweed Frotan told AFP, adding that some 200 fighters stormed the posts.

The Taliban attackers also took seven soldiers hostage, but three of them were later freed after the intervention of local elders, acting provincial governor Shah Waliullah Adeeb told local media. “Three of those taken hostage were martyred and one other soldier remains missing,” he said.

The defence ministry confirmed the incident in a statement and said the fighting left a total of 33 Afghan soldiers dead, wounded or missing.

The Taliban claimed responsibility for the attack, which highlights Afghanistan’s precarious security situation as US-led foreign troops pull back from the frontlines after a 13-year war against the insurgents.

NATO’s combat mission formally ended in December but a small follow-up foreign force has stayed on to train and support local security forces.

President Barack Obama last month announced a delay in US troop withdrawals from Afghanistan, an overture to the country’s new reform-minded leader, President Ashraf Ghani. Hosting Ghani at the White House for their first presidential face-to-face meeting, Obama agreed to keep the current level of 9,800 US troops until the end of 2015.

The Taliban, who have waged a deadly insurgency since they were ousted from power in late 2001, warned that the announcement would damage any prospects of peace talks as they vowed to continue fighting.

Afghanistan is bracing for what is expected to be a bloody summer push by the Taliban.

The insurgents have already stepped up suicide attacks on government targets, which are taking a heavy toll on security forces.

A US watchdog said in a report last month that Afghan security forces were suffering heavy casualties on the battlefield and large numbers of troops were resigning or deserting their units.

Between October 2013 and September 2014, more than 1,300 Afghan army soldiers were killed in action and 6,200 were wounded, the Special Inspector General for Afghanistan Reconstruction (SIGAR) said in its report.

Between September 2013 and September 2014, more than 40,000 personnel were dropped from Afghan National Army rolls, it added.

The Pentagon insists the Afghan forces are holding their own after the bulk of NATO combat forces withdrew last year.

But senior US officers have voiced concern at the high casualty and attrition rates plaguing the Afghan army.