(CNN) -- Taliban militants attacked a Pakistani army checkpoint near the Afghan border Wednesday, killing eight Pakistani soldiers, according to military officials.
The battle at Surang Baba Ziarat village in the south Waziristan district killed 18 militants, Col. Nadeem Khan told CNN.
"The militants attacked the check post with heavy weapons last night and in response the soldiers fought the militants," Khan said.
A Pakistani Taliban spokesman called CNN to claim responsibility for the attack.
"We took seven dead bodies, out of 12, of soldiers in our custody," Tehrik-e-Taliban Pakistan spokesman Ihsanullah Ihsan said. "It's a lesson for anyone who supports the United States against us."
Fighting was still under way, with helicopter gunships attacking militant hideouts Wednesday evening, Khan said.
CNN's Aliza Kassim and journalist Amir Iqbal contributed to this report.