The assault that took place in Pul-e-Khumri, the capital of Baghlan province, set off a six-hour gunbattle which ended after the attackers were killed.
The Taliban stormed a police headquarters in northern Afghanistan on Sunday, killing 13 police and setting off a six-hour gunbattle, officials said.
The Interior Ministry said the attack in Pul-e-Khumri, the capital of Baghlan province, began at noon with a suicide car bomber striking the entrance to the compound and eight gunmen rushing in after the explosion.
It said 13 police were killed and another 55 people, including 20 civilians, were wounded before the attackers were all killed.
A police official who was inside the compound during the attack said the insurgents all wore a suicide vest and that three of them detonated their payloads, while the other five were shot and killed.
Kalil Narmgo, a doctor at the main hospital in Pul-e-Khumri, said more than 50 wounded people, both military and civilians, had been brought in, including "several" in critical condition.
The Taliban claimed the attack, the latest in an unrelenting wave of assaults on security forces.
The militants group, that ruled Afghanistan prior to the 2001 US invasion, now effectively control nearly half the country and have maintained their tempo of attacks despite holding several rounds of peace talks with the United States in recent months.
In the capital, Kabul, a lawmaker was wounded and his wife was killed in a shooting attack late Saturday.
Police said on Sunday it was unclear if the shooting inside Mohammad Afzal Shamil's home was due to a personal dispute or a targeted attack. Shamil is a member of the upper house of parliament representing northeastern Takhar province.
In the western Herat province, a roadside bomb killed three children and wounded another two on Saturday, according to Jelani Farhad, a spokesman for the provincial governor.
No one claimed responsibility, but the Taliban often plant bombs on the main roads to target government officials or security forces. The bombs often kill civilians.
Police headquarters under attack in northern Afghanistan pic.twitter.com/fFxjdIQ1Mc— TRT World Now (@TRTWorldNow) May 5, 2019
Pakistan vows to 'build peace'
In a separate development, Pakistan says Prime Minister Imran Khan and Afghan President Ashraf Ghani spoke by phone to discuss efforts to end the conflict.
"The Prime Minister underlined that Pakistan will spare no effort to advance the common objectives of building peace in Afghanistan and having a fruitful bilateral relationship between the two brotherly countries," the Pakistani government statement said.
Afghanistan and the United States have long accused Pakistan of harbouring Taliban militants, and believe that many of the group's top leaders are based there. Pakistan denies the allegations and says it uses its limited influence over the militants to encourage peace efforts.
The statement said Khan "reiterated his invitation to President Ashraf Ghani to visit Pakistan for a comprehensive exchange of views on all issues of mutual interest."
The Afghan government said in a statement that Ghani accepted the invitation, but that a date has not yet been fixed.