Taliban militants launched a pre-dawn raid on a district government compound in Afghanistan on Thursday, killing at least seven people including the local governor, officials said.
Twelve police also died and 10 intelligence officers were wounded in the attack on the Khwaja Omari district headquarters in the southeastern province of Ghazni, the provincial governor's spokesman Aref Noori told AFP.
The militants used a ladder to climb into the compound in the early hours of Thursday, deputy provincial police chief Ramazan Ali Mohsini told AFP.
Afghan officials often give conflicting casualty figures immediately after an attack.
"The attack is over and the district is under the control of Afghan security forces after reinforcement forces rushed to the scene following the Taliban attack," Mohsini added.
The Taliban claimed responsibility for the raid in a WhatsApp message to journalists, saying "more than 20 police" were killed and several others wounded.
"Our mujahideen have confiscated weapons and ammunition," Taliban spokesman Zabihullah Mujahid said.
"In the attack three mujahideen were martyred and four others were wounded."
The attack was one of the deadliest by the Taliban in several weeks and comes as the militants prepare to launch their annual spring offensive, which marks the beginning of the traditional fighting season.
The Taliban are under pressure to take up President Ashraf Ghani's offer of peace talks but so far they have not responded directly to the proposal.
The militants had vowed to take revenge over an Afghan air strike last week in an area controlled by the group in the northern province of Kunduz.
Dozens of people, many of them children, were killed or wounded after Afghan Air Force helicopters struck a madrassa in Dashte Archi district, security sources and witnesses told AFP.