Earlier, Ziaul Rahman Sayedkhili, a senior police officer in the eastern province of Parwan, said the death toll included six NATO soldiers, 10 Afghan civilians and two Afghan policemen.
"Two days ago a rocket was fired from the village of Qalandar Khil which hit the Bagram (military) base and this morning a joint Afghan-ISAF operation went there to investigate the case," he said.
"There was a suicide bomber on a bicycle who detonated his explosives which killed 10 local civilians, two policemen and six ISAF soldiers."
ISAF said in a separate statement four of its servicemen were killed. A spokeswoman for the Czech general staff in Prague later said the four dead were Czech soldiers, and that another Czech had been seriously injured.
The Taliban claimed responsibility for the attack in a text message to Reuters.
The attack took place amid deteriorating security in Afghanistan as most ISAF forces prepare to leave the country after 12 years of war against Taliban insurgents.
(Reporting by Mirwais Harooni; Writing by Maria Golovnina; Editing by Jeremy Laurence)