The gunmen opened fire from a Lada car after police had stopped the vehicle.
"The militants were killed as the police returned fire," the source said.
No police officers were injured in the shootout. Two Kalashnikov assault rifles, a Makarov pistol, and a hand grenade were found in the car.
Russia's volatile North Caucasus region has seen a surge in militant attacks against police and civilians in recent months.
In a separate development, an explosive device containing 5.5 kg of TNT and filled with nuts and bolts to increase its destructive power was found in the village of Neitrino in the republic's Elbrus Region.
Add to blog
You may place this material on your blog by copying the link.
Image Galleries: WTA Finals Draw Ceremony
Infographics: Nobel Peace Prize
During the 11th Annual Meeting to be held in Sochi from October 22 to 24, experts of the Valdai International Discussion Club will focus on whether the global community will develop ground rules for the world politics or whether it will be a game without any rules where everyone fend for themselves.