The latest attack in Farah province dashed hopes of some sort of a truce during Ramadan, the Muslim month of fasting, which started on Monday.
The Taliban stormed an army checkpoint in Afghanistan's western Farah province, killing 20 soldiers and abducting two, the latest in relentless attacks that the insurgents carry out even as they negotiate with the US about ending the war, Afghan officials said on Monday.
The overnight attack on the checkpoint in the Farah province's Gulistan district triggered an hour-long gun battle as Afghan troops tried to repel the attackers.
The fate of the abducted soldiers was not immediately known, provincial councilman Dadullah Qaneh said.
Colonel Qais Mangal, a spokesman for the Afghan Ministry of Defense, later confirmed the attack but could not give precise casualties figures.
"I can confirm that an army checkpoint has been attacked and there are casualties among soldiers," he said, adding that reinforcements have been dispatched to the area.
Taliban spokesman Qari Yusouf Ahmadi claimed responsibility for the attack.
The Taliban still carry out near-daily attacks on Afghan forces, even as peace efforts have accelerated to find an end to Afghanistan's nearly 17-year war.
Earlier on Sunday, the Taliban set off a suicide car bombing and stormed a police headquarters in northern Baghlan province, killing 13 policemen and setting off a six-hour gun battle.
The interior ministry said 55 people, including 20 civilians, were wounded before the attackers were all killed.
Last week, an Afghan grand council convened by President Ashraf Ghani called for peace with the Taliban as the president promised to free 175 Taliban prisoners ahead of Ramadan.
But the Taliban on Friday rejected a ceasefire during Ramadan, saying their attacks will continue though the fighters will be "very careful of civilians during any operation."
The insurgents have in the past rejected ceasefire proposals, saying US and NATO troops must withdraw from the country first.
The Taliban also refuse to negotiate directly with the government in Kabul, seeing it as a US puppet.