“Two soldiers and one police officer were killed and three others – two soldiers and another police officer were injured,” said district police superintendent Imtiaz Hussain.
Security forces launched a major search for the militants who fled the scene, according to the Press Trust of India news agency.
Two Indian soldiers killed in Kashmir
Military convoys have been travelling more frequently at night in recent weeks through the region to avoid encountering protesting residents.
Kashmir has been under curfew since protests erupted over the death last month of a popular young rebel leader, Burhan Wani, in a gunfight with security forces.
More than 60 civilians have been killed in clashes between protesters and security forces, and thousands more injured in the worst violence to hit the Himalayan region since 2010.
A top UN human rights official expressed “deep regret” at the failure of Indian and Pakistan authorities to grant his team access to the separate parts of Kashmir to probe recent allegations of human rights violations.
Stop dreaming about Kashmir joining Pakistan, Sushma tells Nawaz
UN High Commissioner for Human Rights Zeid Ra’ad Al Hussein described as unfortunate a failure to independently assess the serious allegations which include use of excessive force and state sponsorship of violence.
“Without access we can only fear the worst,” Zeid said in a statement released in Geneva.
Armed rebels have fought Indian security forces in Kashmir since 1989 for the independence of the region or for it to be made part of Pakistan. The conflict has left tens of thousands, mostly civilians, dead.
Gunmen shot and wounded 10 police paramilitiaries on Monday who were trying to impose a curfew in Srinagar during Independence Day. One of the troopers later died of his injuries.