KABUL, Afghanistan — The Taliban breached an international military base in eastern Afghanistan on Wednesday, in a complex attack that left at least one Western soldier, four Afghan police officers, and two other Afghans dead, Western and Afghan officials said.

The attack, on a Provincial Reconstruction Team base in Ghazni, was eventually stopped by Afghan and Western troops inside the base’s perimeter, and about seven insurgents were reported killed. The Taliban claimed responsibility for the attack in a message sent by Zabiullah Mujahid, a spokesman.

The attack started Wednesday afternoon when a truck bomb exploded at the southern entrance to the base, said Col. Assadullah Khan Ensafi, the deputy police chief in Ghazni. Officials said that Taliban gunmen were then able to get inside the base’s outer boundary — an increasingly rare occurrence as the Afghan security forces have become more adept at heading off bombing attacks. Afghans in the area said they saw plumes of smoke and heard shooting that appeared to be coming from inside.

A spokesman for the International Security Assistance Force, Sgt. Peter Dean, said only that he could confirm that the attack had occurred around 4 p.m. and that multiple attackers had been involved. He said he did not yet have any information on casualties.