The source said police had surrounded a house in central Derbent over reports that an armed group was hiding on the premises.
A militant opened fire at the police and was killed in the shootout. Another militant was also killed during the operation. The firefight also left a civilian woman dead.
Shamil Guliyev, 12, was admitted to Derbent central hospital for surgery on a gunshot wound.
The latest reports said the two militants had been identified as Mansur Velibekov and his brother Gadzhi, both members of a local armed gang.