Rampur is between Uri and Baramulla. The encounter took place during a search operation by the army.
Search operation is currently underway.
The elimation of terrorists comes a day after the Army foiled an attack by Pakistan's Border Action Team (BAT) on the Line of Control (LoC) in Uri sector and killed two of the intruders.
Attack by Pakistan's BAT unit repulsed in Uri, two killed on Friday
The bodies of the slain BAT personnel have not be retrieved as these are lying in the 'no man's land' on the LoC, reports said on Friday.
"At about 8.40 a.m., two armed intruders infiltrated in Uri Sector of Jammu and Kashmir from the vicinity of a known Pakistani post and came close to the Indian Army post, about 500 metres inside the Indian side of the Line of Control," an Army spokesperson was quoted by news agency IANS.
After firing exchanges, the two intruders were killed by the Indian Army.
One AK-47 rifle, one pistol and "warlike" stores were recovered from the slain BAT personnel.
On May 1, two Indian soldiers were killed and their bodies mutilated in a BAT attack in Poonch district of Jammu and Kashmir.
The Indian Army said such attacks are carried out under the command and cover provided by the Pakistan Army to groups of militants.
(With IANS inputs)