The soldiers came under fire after they surrounded Ratnipora village, 35 kilometres south of the main city of Srinagar, overnight on Monday following a tip-off that separatists were in the area.
Read: Commonwealth parliamentary moot: ‘Kashmir a disputed territory, so no invite for its assembly’
Hundreds of villagers poured onto the streets when the gun battle resumed at first light, throwing rocks at police and chanting "We want freedom!," a police officer said on condition of anonymity.
Officers fired tear gas and live rounds into the air to disperse the crowds before soldiers finally gunned down the ‘separatists’ in paddy fields, the officer said.
"Two terrorists were killed, and the encounter has ended. Both are locals," said Javaid Gillani, inspector general of police for the region, adding that a policeman was injured.
"There was a lot of stone pelting in the area," Gillani told AFP.
Government forces have been on heightened alert in the southern Kashmir valley, where police say sizeable and locally trained armed groups have been operating for months.
In July a group of 11 armed separatists wearing army fatigues posed for photos and a video which were posted on Facebook.
Since 1989 several groups have been fighting hundreds of thousands of Indian forces deployed in the region. They seek either independence or a merger of the disputed territory with Pakistan.
Read: Occupied valley: ‘Govt doing best to resolve Kashmir issue’
The fighting has left tens of thousands, mostly civilians, dead.
Kashmir has been divided between India and Pakistan since the South Asian rivals gained independence from Britain in 1947. Both claim the Himalayan territory in full.
Violence in the region has steadily declined since the early 2000s, but battles between government forces and separatists are still frequent.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ