Based on intelligence developed by police on the presence of terrorists, security forces launched an operation in the Laam forest of Tral area, the police official said.
A gun battle broke out when the terrorists opened fire at the security forces, he said.
In the initial exchange of fire, one soldier and a policeman sustained injuries. They were evacuated to hospitals in Srinagar but succumbed to injuries, the official said.
The identity of the slain terrorists was being ascertained, the official said adding at least two of them were believed to be foreigners.
Follow NDTV for latest election news and live coverage of assembly elections 2019 in Maharashtra and Haryana.
Subscribe to our YouTube channel, like us on Facebook or follow us on Twitter and Instagram for latest news and live news updates.