Police shot dead the two men in Noida, a city a few miles from New Delhi, around 2am (2030 GMT), and said they could have been Pakistanis. "We recovered AK-47 rifles and grenades and some documents, including a Pakistani passport," Navin Arora, a senior police officer in Noida, told reporters.
Brij Lal, a senior police officer, said the recovery of a passport indicated that the suspects were from Pakistan.
One policemen was injured in the gun battle.
The incident came as India prepares to celebrate its Republic Day on Monday and when the country is on high alert after the Mumbai attacks last year.
In late November, militants killed 179 people in coordinated attacks in India's financial capital.
The attacks have raised tensions between India and Pakistan, who have fought three wars since independence from Britain in 1947.