The heavily-armed terrorists, apparently a "suicide squad", were holed up in a multi-storey government building of Entrepreneurship Development Institute (EDI) in Pampore, along the Srinagar-Jammu National Highway, since Saturday afternoon.
"The encounter has ended and three militants who had taken refuge inside the building have been killed," a police official said.
"We have killed three militants of whom we had the information," Major General Arvind Dutta, General Officer Commanding of Victor Force, told reporters.
To a question, he said by saying "foreigners", he meant they had come from "across the border", hinting at Pakistan.
More From This Section
In Delhi, CRPF Director General Prakash Mishra said the attack "appears to be" the handiwork of Lashker-e-Taiba (LeT) terror outfit.
Maj Gen Dutta said 'war-like' stores, including large quantity of arms and ammunition were recovered from the site.
A combing operation was underway to sanitise the building which has 44 rooms plus lobbies, washrooms and a restaurant on the top floor, he said.
A civilian was killed in the crossfire between the two sides while 120 civilians were evacuated safely.
As the operation entered the third day today, the Special Forces of the army maximised the force, using mortar shells to flush out the terrorists, the officials said.
Maj Gen Dutta said the building appeared to be a pre-determined target where they rushed into after attacking a CRPF convoy on the highway.