Ramazan Ali Moseni, deputy chief police in Ghazni province, said seven killed were police officers and five were members of the country's intelligence agency known by the acronym NDS were also killed.
A pre-dawn attack by the Taliban on a government compound in southeast Afghanistan has left at least 15 dead, including several intelligence agents and the local governor, as the Islamists open their spring "fighting season".
"In the attack, three mujahideen were martyred and four others were wounded".
In the past year, the Taliban have been stepping up their attacks on district centres.
Shaker said that a number of officials were killed after a Public Order Police vehicle stepped on a roadside mine. "After the attack the forces called for air support and 27 Taliban were killed during the airstrikes and clashes", it added.
"Our mujahideen have confiscated weapons and ammunition", Taliban spokesman Zabihullah Mujahid said.
Trump orders review of Postal Service amid Amazon accusations
Prime membership could get more expensive if Amazon is forced to pay the US Postal Service more to deliver packages. It said the Postal Service had lost 65 billion dollars since the 2007-2009 recession.
A United Nations report showed on Thursday that ordinary Afghans are increasingly in the crosshairs of militants, with the number of civilians killed or wounded in attacks deliberately targeting them more than doubling in the first quarter.
The casualty figures are impossible to independently verify because of the remoteness of the area.
The Taliban are under pressure to take up President Ashraf Ghani's offer of peace talks but so far have not responded directly to the proposal.
The Taliban claimed responsibility for the raid, saying more than 20 members of Afghan security forces were killed and several others wounded.
"All parties to the conflict in Afghanistan must do everything in their power to protect civilians from harm", said Ingrid Hayden, the secretary-general's deputy special representative for Afghanistan.