Firefighters saved 138 people in the two-story Republican School for Deaf Children. Many survived only after being thrown from second-story windows onto mattresses and other bedding used to break their fall, teacher Marzhanat Aliyeva said.
Some of the school's older children also helped to lead younger students to safety, emergency officials said. The school was home to students between the ages of 6 and 14.
All of those rescued were hospitalized, many with burns, smoke inhalation, fractures and shock, said Ramazan Magomedov, deputy chief doctor at the main hospital in Makhachkala, 1,000 miles south of Moscow. Seventeen were listed in serious condition.
Fire department chief Artur Akhmedov said the blaze spread quickly, engulfing the wing where the school's youngest children lived. The children who died were mostly 6- and 7-year-old boys, emergency officials in Makhachkala said.
Some of the children were found cowering under furniture, officials said.
Emergency officials said the fire may have been caused by a short circuit that occurred when electricity was restored to the building after a blackout.
Zoya Darayeva, the principal, told Rossiya television that a night attendant had smelled smoke coming from a room, but the door was locked. She then saw flames coming out of an outlet in a corridor and thick smoke.
The school staff attempted initially to put out the flames themselves, delaying a call to the fire department by at least nine minutes, emergency officials said. High winds also interfered with the efforts to extinguish the fire.
"There was such a roar of wind and fire," said Aliyeva, the teacher, who arrived at the scene as the school was still engulfed in flames.
Distraught, sobbing parents and other relatives crowded outside the Makhachkala hospital and near the school, trying to find their children's names on handwritten lists. Russia's TVS showed a group of women clutching one another and wailing.
An Emergency Situations Ministry plane from Moscow arrived in Makhachkala with a team of doctors and medications for the injured. The most seriously injured students were likely to be brought to the Russian capital for treatment, Russian news agencies reported.
The brick school building was heavily damaged. All the windows shattered, and television footage showed charred bed frames and furniture. The walls were blackened.
The fire came on the heels of a deadly school blaze in northern Siberia earlier this week. A two-story, old wooden school in a village in the republic of Yakutia was completely destroyed in the fire Monday, which killed 22 students and injured at least 10.
Prosecutors blamed that blaze and the high number of casualties on building code violations.
Russian Prime Minister Mikhail Kasyanov on Thursday ordered an immediate fire safety survey of all Russian schools, particularly in rural areas, in an attempt to prevent any new tragedies.
Fifty people a day — 18,000 a year — die in fires in Russia. Most are caused by people smoking while drinking or others who are just plain careless. There are also inadequate fireproofing and alarm systems in many buildings.
The fire death toll is 4½ times greater than in the United States, which has twice the population. The contrast is even starker with the United Kingdom, which sees 600 fire deaths a year, or one per 100,000 people — compared to 12.5 per 100,000 in Russia.
Russia's Izvestia newspaper reported that last year, 700 fires damaged school buildings across Russia.