The troops used brute force and fired bullets, pellets and teargas shells.
The slain militants were identified as Saddam Paddar, a Hizbul Mujahideen commander, Tawseef Sheikh, Molvi Bilal, Adil Ahmad and Muhammad Rafi Bhat, the professor who according to police had joined militant ranks.
"Initially a civilian was killed near the gunfight site when people came to attack the forces in a bid to breach the cordon but protests continued even after the culmination of gunfight and broke out at several places", said a local government official on condition of anonymity.
Hundreds of villagers, shouting slogans eulogizing militants and demanding an end to Indian rule over the disputed region, threw rocks at Indian troops in a bid to help rebels who were trapped in a house in southern Shopian area, police said.
A guerilla war and separatist movement is going on in Indian-controlled Kashmir since 1989.
Some Kashmiri groups in Jammu and Kashmir have been fighting against Indian rule for independence, or for unification with neighboring Pakistan.
A statement by the University of Kashmir on Saturday said the sociology teacher, Mohammed Rafi Bhat, had been missing since Friday.More news: Boston Celtics and Cleveland Cavaliers on Course for the Eastern Conference Finals
More news: Costa helps Atletico sink Arsenal to reach Europa final
More news: Why are gas prices so high?
Over a dozen civilians were injured in the clashes between the protesters and the security forces.
A student who participated in the funeral prayers said that it was decided that the students, scholars and faculty members including females will hold a massive congregation on Wednesday when the university will resume the routine.
Internet services in the area were suspended in the aftermath of Sunday's killings, a Reuters witness said, and train services have been suspended.
The Joint Resistance Leadership of separatists on Sunday asked people to march to the chief minister's office in Srinagar on Monday to protest against the bloodshed.
"Today's deaths have brought a stark fact to fore that gun, either way of a militant or that of security forces, is no solution for resolving issues". He had completed his Ph.D programme on whole time basis in department of Sociology after successfully defending his thesis entitled "Globalization and emerging trends in Consumerism: A comparative study of rural and urban Kashmir".