The head of the Dagestani division of the Federal Security Service, General-Major Vyacheslav Shanshin said seven fighters were confirmed killed and police were searching for more bodies.
Russian TV showed heavy armoured vehicles and government forces moving through neighbourhoods as gunfire and explosions went off in the background.
In a different part of Makhachkala, police stormed an apartment building looking for another armed gang, said Mark Tolchinsky, an interior ministry spokesman.
It was unclear whether the two gun battles were connected to one another. Police earlier detained a man wanted in connection with an attack on interior ministry troops earlier this month that wounded several soldiers.