They were from the Lashkar-e-Taiba, said the army.
One terrorist was killed yesterday and another was shot dead today at the seven-story Entrepreneurship Development Institute (EDI) building in the town 15 km from Srinagar, where young Kashmiris are given vocational training.
After a search of around 60 rooms and as many bathrooms in the battered and burnt building, the army said there was no third terrorist as suspected earlier.
“The operation was tricky and we did not want any collateral damage,” an army official said, explaining the three-day operation.
Over 50 rockets, machine guns and hundreds of grenades were used against the terrorists. The army also brought in special forces from the same unit that had carried out surgical strikes in Pakistan last month.
“The terrorists survived because the seven story building was like a concrete bunker for them,” said Major General Ashok Narola.
The terrorists are seemingly well-stocked in ammunition and supplies and prepped for a prolonged operation, which made it a tough challenge for the forces. Despite the building catching fire several times, the terrorists held out.
Classes have not been held for more than three months in the institute because of the unrest in the state that began with the killing of 22-year-old terrorist Burhan Wani in July.
Sources said that terrorists approached the campus through boats on the River Jhelum, which flows from Kashmir into Pakistan. They entered the building apparently because they could not carry out a planned attack along the highway.
According to the police, the terrorists set sections of the building on fire to lure security forces.
Intel agencies have been warning of terror attacks in retaliation for the surgical strikes conducted by India across the Line of Control two weeks ago to target terrorist staging areas in Pakistan-occupied Kashmir.