The raid took place in the town of Serai Naurang in north-west Khyber Pakhtunkhwa province early on Saturday, and lasted several hours.
Twelve militants were killed in the attack, some of them suicide bombers, the officials said.
Pakistan Taliban says the attack was in response to the death of two commanders in a drone strike last month.
“Pakistan has been co-operating with the US in its drone strikes that killed our two senior commanders, Faisal Khan and Toofani, and the attack on military camp was the revenge of their killing,” a Taliban spokesman said, quoted by Reuters news agency.
Pakistani officials have often been critical of drone strikes, but analysts say that on some occasions it has privately sanctioned such actions.
Police officer Arif Khan said between 25 to 30 militants were involved in the attack.
The Taliban said four of the attackers were suicide bombers.
Security sources said the militants were armed with automatic weapons and rocket-propelled grenades, and said they included suicide bombers.
At least eight soldiers were wounded, the sources said.
The 10 civilians, including three women and three children, were killed in a nearby house.
There are conflicting reports about whether the house was hit by a rocket or the militants broke into it.
Prosecutors and Donald Trump’s attorneys delivered opening statements and the first witness was called on…
The House of Representatives has finally approved $61 billion in new US military aid for…
The real estate market in the United States has always been a gauge for economic…
France's first lady Brigitte Macron will be the subject of a biopic series. Production company…
A first glimpse of the new business venture from Meghan Markle has been teased on…
Court has wrapped up for the first day of Donald Trump's long-awaited hush-money trial in…