The attack was later claimed by terrorists affiliated with the Pakistani Taliban.
The early-morning attack targeted a base in Dera Ismail Khan district of Khyber Pakhtunkhwa province, near the Afghan border, according to a local official who spoke on condition of anonymity.
"Many of them were killed while they were sleeping and in civilian clothes so we are still determining if they are all military personnel," the official added.
An additional 27 people were wounded when the explosive-laden suicide vehicle detonated at a school building that had been commandeered as a makeshift military base, he said.
Three rooms had collapsed and efforts were underway to pull bodies from the ruins, with fears the toll could rise further still, he added.
Tehreek-e-Jihad Pakistan – a new group affiliated with the Pakistan Taliban – said the assault began around 2:30 a.m. (9.30 p.m. GMT) with a suicide attack by one fighter before others stormed the compound.
Pakistan's army has not yet commented on the incident.
Pakistan has witnessed a dramatic spike in terrorist attacks, mainly in its border regions with Afghanistan, since the Taliban returned to power there in 2021.
Analysts say Islamist fighters have been emboldened by the neighboring insurgency's success following the withdrawal of US forces in 2021.
The first half of 2023 saw a nearly 80% spike in attacks compared to last year, according to the Pakistan Institute for Conflict and Security Studies.
Islamabad alleges that hostile groups operate from "sanctuaries" across the border, a charge the Taliban government routinely denies.
The biggest threat to Pakistan is its domestic chapter of the Taliban known as Tehreek-e-Taliban Pakistan (TTP), which shares lineage and ideology with Kabul's rulers.
In January, the TTP was linked to a mosque bombing that killed more than 80 police officers inside a headquarters in the northwestern city of Peshawar, capital of Khyber Pakhtunkhwa province.
Islamabad said four troops were killed in September during a cross-border raid by "hundreds" of TTP fighters in Chitral, an area popular with domestic tourists.
AzVision.az
More about: