The video, posted on LiveLeak website, showed the policemen and other security personnel, all clad in shalwar-kameez, standing in a line on a hillside with their hands tied behind their backs.
Four armed Taliban fighters with covered faces are standing in front of the security personnel. One of the militants, believed to be a commander, accused the security personnel of killing six children in the former Taliban stronghold of Swat.
He also described them as “murtards” or those who have abandoned Islam and claimed they were “enemies of Islam”.
The four militants then opened fire on the security personnel while a fifth person filmed the executions with a video camera.
The security personnel collapsed to the ground as the militants continued firing till they ran out of bullets.
Most of the security personnel were killed in the initial firing while a few were heard moaning.
One militant then reloaded his assault rifle and moved down the line of men, firing several shots into each of them.
The bodies of the executed personnel were discovered by local residents after the militants left the area.
Chief military spokesman Maj Gen Athar Abbas told the media on Monday that the incident occurred on June 1.
“They are merciless terrorists and this is the threat we are up against,” he said.
Reports said the securitymen in the video were captured when hundreds of Pakistani Taliban fighters staged an attack from Afghanistan in Upper Dir district of Khyber-Pakhtunkhwa province.
Pakistani officials had then said 27 security personnel and over 40 militants were killed in clashes.
Pakistani Taliban claimed responsibility for the attack.
Pakistan later lodged a protest with Kabul over the attack and called for stern action by Afghan and US-led forces against the insurgents.