Islamabad, Pakistan (CNN) -- Militants attacked an army base in northwest Pakistan in a coordinated assault that resulted in an hours long gun battle that left at least 35 people dead on Saturday, intelligence and security officials said.
At least 13 security personnel, 10 civilians and 12 militants were killed in the early morning attack on the base that included housing for Pakistani military personnel and their families near the town of Serai Naurang in the Khyber Pakhtunkhwa province, the officials said.
About 40 militants targeted the base as well at least one house believed to be a home for some of the personnel and their families.
Two of the militants who were killed were wearing suicide jackets, intelligence officials said. Ten civilians, including three women and three children, also died when one of the suicide bombers entered a nearby house and detonated the explosives, they said.
The Pakistani Taliban claimed responsibility for the assault, saying it was in retaliation for a drone strike in nearby North Waziristan last month that killed two of its commanders.
"This attack was to avenge the deaths of two of our commanders who had been killed in a drone attack last month," Pakistani Taliban spokesman Ehsanullah Ehsan told CNN.
The Pakistani military confirmed the attack, saying the army responded in full force.
Journalist Zahir Shah Sherazi contributed to this report.