KABUL, Afghanistan — Five Afghan police officers were killed and 18 people were wounded in a Taliban attack Sunday on a major base in the eastern province of Paktia, Afghan officials said.

The attack on the Spin Ghar region’s Police Headquarters began when a suicide bomber detonated a car full of explosives at the gate of the compound, creating a breach, officials said.

Another car drove through the gap, and at least three attackers emerged and began shooting at police officers, according to accounts from Asadullah Sherzad, commander of the 303rd Spin Ghar Police Zone, and from Najibullah Danish, the spokesman for the Afghan Interior Ministry.

The police said that they killed most of the attackers, but that at least one remained holed up inside, firing at Afghan forces.