Numan and Abu Saad, both foreign nationals, were killed in a gunfight in Thak-Gund village of Sopore, an army spokesman said.
He said that based on input about the presence of foreign militants in the village, a joint operation was launched by the army and police to flush out the militants.
"While the cordon was being readjusted around the suspected house, the security forces received heavy automatic fire and a heavy gunfight ensued.
"By precise firing and without causing any collateral damage, the troops neutralised the two foreign terrorists," the spokesman said.