KABUL, Afghanistan — Taliban fighters stormed a major police base in Afghanistan on Sunday, killing at least five officers, residents and officials said.

The target of Sunday’s attack in the eastern town of Gardez was a massive facility that is also used as a training center and police headquarters.

The assault began with a suicide car bomb outside the base just before the start of the morning’s rush hour, residents said. Militants wearing military uniform then entered the compound, sparking a gun battle with security forces.

The attack ended midday after nearly six hours of clashes, said Najib Danesh, the interior ministry’s chief spokesman.

Civilians as well as officers were wounded both in the gun battle and the car bomb’s blast, Danesh said. He said five members of the police were killed, although Taliban spokesman Zabihullah Mujahid claimed scores of police lost their lives in the attack.

With President Ashraf Ghani’s government locked in internal division and amid weeks of protest by a group of people demanding his administration’s resignation over rising unrest, the militants have stepped up and broadened their attacks recently.

Sunday’s attack came a day after an Afghan commando fired on U.S. troops, wounding seven American soldiers. A week earlier, a Taliban infiltrator killed three U.S. troops in eastern Afghanistan.

The attack on the Gardez police base is the second one by the Taliban against a major government military installation since April, when a significant assault by militants on a military base left more than 130 soldiers dead, although the government initially said only a small number were killed.