Pakistan said those killed, mostly men of the Noorzai tribe, were visiting Afghanistan for a traditional New Year holiday.
However, an Afghan army officer, General Abdul Raziq, said on Thursday that his forces had killed 16 members of the Taliban on Tuesday night in mountains 8km east of the town of Spin Boldak near the Pakistani border.
Afghan authorities said they were investigating the killings.
Aftab Ahmed Khan Sherpao, the Pakistani interior minister, said one of those killed was wanted by Pakistani authorities but that "they were not Taliban".
In Islamabad, a government spokeswoman, Tasnim Aslam, said Pakistan had obtained information from Afghan officials that the group had been detained by Raziq's troops in Kabul and taken back to Spin Boldak, where they were executed with their hands and feet bound.
"Today, we called the Afghan ambassador and lodged a strong protest," Aslam said, adding that Pakistan's ambassador in Kabul had delivered a similar message to Afghanistan's foreign secretary.
"They've been crossing the border for attacks in Afghanistan"
The incident comes during a sharp deterioration in ties between the two neighbours due to Afghan accusations that Taliban fighters were finding sanctuary in Pakistan.
Afghanistan has seen a surge in bombings and other attacks by Taliban insurgents and their allies in recent months. The Taliban has said it intends to launch a spring offensive against US-led foreign forces and the Western-backed government.
The bodies of 14 of the men were brought to the Pakistani town of Chaman where about 5000 mourners gathered, and around 2500 others gathered in Quetta chanting anti-Afghan government slogans.
A Pakistani official said the other two bodies were buried in Afghanistan.
Jilani Khan, a brother of one of the dead, said the men were killed in a "fake encounter" resulting from a tribal feud.
Raziq dismissed the suggestion that the 16 were civilians. He said two Taliban commanders known to have organised suicide attacks and ambushes were among those killed by his troops.
"They've been crossing the border for attacks in Afghanistan. We also seized their weapons," he said.
Hamid Karzai, the Afghan president, visited Pakistan last month and repeated complaints that Islamabad was not doing enough against the Taliban operating from its Pashtun tribal lands on the border.
Pakistan has stationed 80,000 troops on the frontier, but says Afghanistan also needs to do more to stop fighters from crossing the border.