Insurgents dug a tunnel in volatile Sangin district and then blew it up before their fighters could attack the compound.
After the bomber detonated the explosives-laden car, a group of insurgents stormed the compound and engaged fire with Afghan forces.
The Taliban claimed they were behind a fatal roadside bombing in northern Kunduz province, that had killed the US soldier. A Taliban spokesman even tweeted a purported photo ID of the slain US soldier, without saying how it was obtained.
At least 70 people have been wounded in a suicide bombing and assault on Bagram Air Base north of capital Kabul.
"At around 5 pm this evening a mine planted by the Taliban terrorists hit a civilian car ... killing 15 civilians and wounding two more," says Nasrat Rahimi, an Interior Ministry spokesman.
They were travelling in a car and stopped at a Taliban checkpoint on the road, Paktia governor spokesman Abdullah Hasrat said. The Taliban has long targeted the judiciary in retaliation for harsh sentences given to their fighters.
A UN report said 2,563 civilians were killed and 5,676 were wounded in the first nine months of this year. Insurgents were responsible for 62 percent of the casualties.
The Taliban, who already have unleashed a string of bombings, have in recent days issued repeated warnings they intend to attack polling centres and have told voters to stay away.
The cancellation of the agreement between the US government and the Taliban has nothing to do with the loss of life.
US diplomats have been holding talks with Taliban representatives for months about a plan to withdraw thousands of American troops in exchange for security guarantees by the Taliban.
Taliban launched offensive against Farah city in western Afghanistan, officials say, in latest attack as US pushes for a peace deal that would allow it to begin withdrawing troops.
Afghan President Ashraf Ghani's comments come as the country marks a subdued 100th Independence Day and mourns at least 63 people killed in a bombing in Kabul claimed by a local Daesh-affiliate.
Subscribe to our Youtube channel for all latest in-depth, on the ground reporting from around the world.
Copyright © 2020 TRT World.