KANDAHAR, Afghanistan — Afghan border security troops were asleep inside their remote post in southern Afghanistan early Friday when a Taliban infiltrator climbed a guard tower. Moments earlier, a lone sentry had left the post to wake his replacement.

As the new sentry climbed the tower, he was shot dead by the insurgent hiding inside, officials in Kandahar Province said Saturday.

Then, moments later, Taliban fighters rammed a stolen police Humvee packed with explosives through the entrance of the base, they said. Once inside, the attackers shot and killed security troops who had survived the initial explosion.

All 32 men posted at the base died, said Khalid Pashtun, a member of Parliament from Kandahar.

“No one survived,” he said.