Sporadic gunfire and explosions could be heard throughout the standoff. One girl lay wounded on the school grounds, but emergency workers could not approach because the area was coming under fire, said regional Emergency Situations Minister Boris Dzgoyev.
There were other conflicting casualty reports.
ITAR-Tass, citing local hospitals, said one person died at the scene and seven in hospitals. Dzgoyev put the death toll at four, and the Federal Security Service chief for North Ossetia, Valery Andreyev, later said two civilians were killed including a school parent and two wounded.
Emergency officials and doctors said 11 people were wounded, and a doctor told NTV television that two of them were in grave condition. Two bodies were visible outside the school, and there were reports that one attacker was killed.
The crisis began after a ceremony marking the first day of Russia's school year, when students often accompanied by parents arrive with flowers for their new teachers. The school covers grades 1-11, but Dzgoyev said that most of the children taken hostage were under 14 years old.
Shortly after 9 a.m., the attackers drove up in a covered truck similar to those used for military transport. Gunfire broke out, and at least three teachers and two police were wounded, said Alexei Polyansky, a police spokesman for southern Russia.
Most of the hostages were herded into the school gym, but others primarily children were ordered to stand at the windows, he said. He said most of the militants were wearing suicide-bomb belts.
At least 12 children and one adult managed to escape after hiding in the building's boiler room during the raid, said Ruslan Ayamov, spokesman for North Ossetia's Interior Ministry. Media reports suggested that as many as 50 other children fled in the chaos as the attackers were the raiding the school.
"I was standing near the gates music was playing when I saw three armed people running with guns. At first I though it was a joke, when they fired in the air and we fled," a teenage witness, Zarubek Tsumartov, said on Russian television.
Hours after the seizure, the militants sent out a blank videotape, a message saying "Wait" and a note with a cell phone number, Russian officials and media said. Andreyev, the federal security official, said "for a long time we could not make contact" with the attackers, but that authorities reached them by phone and that "negotiations are being held now."
Andreyev said there might be 120-300 captives, while an official at the Emergency Situations Ministry branch for southern Russia said authorities believed the number was 336. Earlier, officials had said up to 400 people were taken captive.
"The main task is to free the children alive and everybody located there, but the most important thing is the children," he said. He said the hostage-takers had refused offers of food and water.
Lev Dzugayev, an aide to North Ossetia's president, said brief contact with the captors indicated they were treating the children "more or less acceptably" and were holding them separately from the adults.
Dzugayev said the attackers might be from Chechnya or another neighboring region, Ingushetia; relations between Ingush and Ossetians have been tense since an armed conflict in 1992. But in Washington, a U.S. official speaking on condition of anonymity said the hostage-takers were believed to be Chechen rebels.
A representative of Aslan Mashkhadov, a rebel leader elected president of Chechnya in 1997, denied involvement in a statement on a separatist Web site.
Earlier, the school attackers demanded talks with regional officials and a well-known pediatrician, Leonid Roshal, who aided hostages during the deadly seizure of a Moscow theater in 2002, Polyansky said. Andreyev later said Roshal was contacting the captors.
They also demanded the release of fighters detained over a series of attacks on police facilities in Ingushetia in June, ITAR-Tass reported, citing regional officials.
Parents of the seized children videotaped an appeal to Putin, urging him to fulfill the terrorists' demands, said Fatima Khabolova, a spokeswoman for the regional parliament.
"We pray to God that this may end without bloodshed," said Marina Dzhibilova, whose two sons were inside. Distraught, she was supported by her sisters.
- Watch live at the Democratic National Convention
- Farewell to VCRs: Japanese maker to shelve...
- At least 15 killed, dozens injured in knifing...
- Women underrepresented across Utah's...
- Mike Lee, US Senate to hold monument meeting...
- After disputes, Dem stars turn their...
- After turmoil, Sanders, Michelle Obama,...
- Wish granted: Six-year-old boy will be...
- If Mitt Romney endorsed Gary Johnson,... 75
- Hillary Clinton promises steady hand in... 56
- Sarah Silverman: Bernie-or-bust Dems... 49
- Is Bernie Sanders an atheist? 45
- Trump says Russia should find Clinton's... 43
- Obama boosts Clinton: Carry her like... 41
- Clinton wins historic nomination,... 37
- Democrats and Republicans double-down... 34