ISLAMABAD, Pakistan — Taliban fighters armed with rifles and rocket launchers killed at least eight Pakistani soldiers during an ambush early on Wednesday in South Waziristan, near the Afghan border, military officials and Taliban commanders said.

Large-scale Taliban assaults against the Pakistani Army are relatively rare in South Waziristan, where the army conducted a major operation in 2009. But tensions have risen in recent weeks amid a flurry of drone strikes by the Central Intelligence Agency and speculation that the army is planning a drive into neighboring North Waziristan.

Exact details of what happened during Wednesday’s attack were unclear. A spokesman for Tehrik-e-Taliban Pakistan, commonly known as the Pakistani Taliban, said the group’s fighters killed 20 soldiers during an assault on a post in the Serwakai district.

The spokesman, Ehsanullah Ehsan, said seven additional soldiers had been kidnapped and were later beheaded.