The attack took place inside a base of the Afghan army in the city, according to a security official in Gardez, who spoke on condition of anonymity because he was not authorized to give details while the incident was still under investigation.
All foreign troops in Paktia are believed to be Americans, but the NATO statement on the incident did not reveal the nationalities of the slain service members. NATO said the shooting was carried out by a gunman wearing the uniform of the Afghan National Security Forces, but it gave no further details.
Killings by uniformed Afghans of foreign soldiers and civilians rose dramatically last year, eroding confidence between the sides at a crucial turning point in the conflict. So-called insider attacks killed 62 personnel in 47 incidents last year compared to 35 killed in 21 attacks a year earlier, according to NATO.
So far in 2013, 11 foreign soldiers have been killed in seven such attacks, including Saturday's, according to an Associated Press count.
In some cases, militants have donned Afghan army or police uniforms to attack foreign troops, but a number have been carried out by members of Afghan security forces against their own comrades.
The attacks come as NATO and Afghan forces are in more intimate contact, with foreign troops handing over security to the Afghans and continuing to train them prior to an almost total withdrawal by the end of 2014.
Copyright 2013 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.