A paramilitary officer says Indian forces have killed two suspected rebels in a clash in Indian-controlled Kashmir, and dispersed hundreds of protesters who took to the streets to show their solidarity with the rebels.

Officer Nalin Prabhat said the fighting erupted in the southern Pulwama area on Thursday following intelligence that some militants were hiding there.

He said the rebels hurled grenades and sprayed gunfire at the soldiers in an attempt to escape before they were shot dead.

Hundreds of residents of nearby villages clashed with troops in support of the rebels. Police fired tear gas to disperse the rock-throwing protesters. No injuries were reported.

Rebel groups have been fighting for Kashmir's independence from India or its merger with neighboring Pakistan. Kashmir is divided between India and Pakistan.