The encounter took place after the Army and police started searches in Kalgai area this morning following inputs about movement of terrorists.
"A cordon was laid and search operation was started in Kalgai area of Uri this morning following information about presence of militants in the area," an Army official said.
He said the search operation turned into an encounter after the militants opened fire on the security forces.
Director General of Police S P Vaid said the militants were planning a "suicide" attack like the one carried out on an Army base in Uri last year that left 19 soldiers dead and several others injured.
"A big tragedy has been averted. Like the suicide attack on the Army base last year, they (militants) had similar plans this time, but the police and the Army got the information before hand. A joint operation is going on to neutralise the ultras," he said on the sidelines of an event here.