Meanwhile a suicide bomb attack claimed by Daesh has killed at least two persons in Afghan capital Kabul. Separate suicide bombing attacks by Taliban militants in Helmand province left three more security personnel dead.
Taliban militants have attacked an Afghan army post and killed 18 government soldiers, the defence ministry said on Saturday, while a suicide bomber in the capital killed two persons and wounded seven.
Violence has intensified in Afghanistan since US President Donald Trump unveiled a more aggressive strategy in August with US-led forces carrying out more air strikes and the Taliban responding with bombs, ambushes and raids.
Militants attacked a government army post overnight on Friday in the western province of Farah, a Ministry of Defence spokesman said.
"A large number of Taliban attacked an army outpost and we lost 18 soldiers and two were wounded," said the spokesman, Dawlat Waziri.
Waziri said he had no more details of the attack. The Talbian claimed responsibility and said two of their fighters were killed.
Kabul suicide attack
On Saturday, a bomber blew himself up on a road near the headquarters of Afghanistan's NATO-led mission. The identity of the casualties was not known, said Interior Ministry spokesman Najib Danish.
Daesh claimed responsibility in a message on their Amaq news agency.
The bomb attack is the latest in a spate of attacks in the city in which hundreds of people have been killed and wounded.
The capital has been on high alert since a Taliban suicide bomber blew up an explosive-packed ambulance on a busy street on January 27, killing more than 100 people and wounding at least 235.
A week earlier, militants killed more than 20 people, including four Americans, in an attack on one of the city's top hotels. The Taliban claimed that attack too.
Daesh's Afghan affiliate, which first appeared near the border with Pakistan in 2015, has become increasingly active and has claimed several recent attacks.
The Western-backed government is under growing public pressure to set aside rivalries and improve security.
President Ashaf Ghani has approved a new security plan for Kabul but it was not clear what steps could be taken in the city of 5 million people, which already has numerous checkpoints and vehicle restrictions.
TRT World spoke to Kabul-based journalist Sayed Salahuddin for the latest.
Suicide bombings in Helmand
Also on Saturday at least three security personnel were killed in separate suicide bombing attacks in southern Helmand province, an Afghan official said.
Omar Zwak, spokesman for the provincial governor in Helmand, said a car bomber early Saturday was shot by Afghan army soldiers but his vehicle managed to reach the entrance of the army base in Nad Aali district, killing two soldiers and wounding another.
In a second suicide bombing attack near another military base in Helmand's capital city Lashkar Gah, one security person was killed and seven civilians wounded, Zwak said.
Qari Yusouf Ahmadi, a Taliban spokesman, claimed responsibility for both suicide attacks in Helmand province.