Lieutenant General Sudhir Sharma said the gun battle erupted on Saturday after Indian troops spotted at least 10 rebels trying to cross the ceasefire line dividing disputed Kashmir between India and Pakistan.
Six rebels and two soldiers died in the five-hour clash in Poonch, about 220km northwest of Jammu, a large city on India's side of the line, Sharma said.
Two more soldiers were seriously wounded, he said, adding that "we may find more bodies".
"It was big group of heavily armed terrorists trying to infiltrate into the Indian side amid rains and poor visibility," Sharma said. "Our troops challenged them and the infiltrators started firing using AK-47 rifles and grenade launchers."
Security forces were searching the area for rebels who might have escaped, he said.
Sharma said several AK-47 rifles, grenade launchers and satellite phones were recovered from the dead rebels.
"Our troops challenged them and the infiltrators started firing using AK-47 rifles and grenade launchers"
Lieutenant General Sudhir Sharma,
Indian army official
More than a dozen Islamic rebel groups have been fighting security forces for 16 years in India's portion of Kashmir, calling for independence or a merger with Pakistan.
The insurgency has claimed more than 66,000 lives.
India accuses Pakistan of training and funding the rebels - a charge denied by Pakistan, which says it is cracking down on rebel groups operating from its territory.
The two neighbours have fought two wars over Kashmir since their independence from Britain in 1947.
Rebel violence in the Himalayan territory has subsided in the past two years after renewed efforts by India and Pakistan to make peace and resolve the Kashmir dispute.