In a fierce gun battle at an army camp in Indian-administered Kashmir, four have been killed with a civilian; three armed militants.
The three gunmen forced their way into the camp near the Line of Control (LoC), the de facto border that divides Kashmir between India and Pakistan.
An army official said the attackers entered after cutting through a fence.
Both India and Pakistan claim Kashmir in its entirety. Militants have been fighting Indian rule since 1989.
The gunmen stormed the army base at Tangdhar, 140 kilometres (87 miles) northwest of the main city of Srinagar, firing automatic weapons.