Russian special forces early today captured control of the Moscow theater where Chechen rebels had been holding 700 hostages, after a dramatic pre-dawn battle inside the building that resulted in most of the guerrillas being killed and large numbers of hostages either dead or wounded.

Shortly after 7 a.m., the Russian troops freed the hostages in a bloody ending to a standoff that began Wednesday. "The whole building is under control," said a visibly shaken police spokesman, Pavel Kudryavtsev, as scores of ambulances raced to bring out the casualties.

Movsar Barayev, the young leader of the heavily armed Chechens, was killed, along with 32 other militants, Russian officials announced as sappers worked frantically to clear the booby-trapped theater.

At dawn, Deputy Interior Minister Vladimir Vasilyev said Russia was "just counting" the casualties. He said an unknown number of militants had escaped and one was captured standing among a group of journalists from Russian NTV television. He urged the remaining rebels to give up and promised to spare their lives.

Russian forces stormed the building after two hostages were killed by the rebels. Acknowledging the chaos that enveloped the theater building in the early morning hours, Vasilyev said, "the operation did not go quite according to plan." He added, however, "Actually we foresaw something like this happening."

Unconfirmed reports suggested that there may be hundreds of wounded and dozens of fatalities. At City Hospital No. 13, more than 100 casualties were admitted in a "state of severe shock," the Interfax news agency reported. Several people interviewed there said relatives were being treated for what appeared to be inhalation of some type of gas.

The dramatic climax to the hostage confrontation began around 3:30 a.m., when a series of loud explosions echoed through the area. Russian officials said the blasts marked the beginning of the Chechens carrying through on their threat to kill the hostages.

According to the official Russian account, the Chechens killed two hostages and wounded two others. Soon after, panicked hostages attempted to break out of the building as a group, but only two women made it, officials said. At that point, the Russian special forces charged into the theater.

"The terrorists have started killing the hostages," said Sergei Ignachenko, a spokesman for the domestic Federal Security Service, said shortly after 5:30 a.m.

By 6:30, a third round of shooting erupted and two women left the theater. They were helped to safety by Russian soldiers who had encircled the building. At about 7, scores of ambulances and rescue vehicles arrived at the scene and more hostages started to emerge. Minutes later, the emergency vehicles raced away, sirens blaring in the first of many trips.

The conclusion of the 2 1/2-day crisis that had riveted Russia came hours after a rebel threat Friday to begin shooting their captives early today. The threat had followed a Kremlin offer to spare the rebels' lives in exchange for the safe return of the captives.

A journalist intermediary had conveyed the rebels' pledge to hold off harming the hostages if President Vladimir Putin would declare an end to the war in Chechnya and begin moving troops out of the breakaway republic as a gesture of goodwill.

The Russian journalist, Anna Politkovskaya, had spent much of the day Friday in talks with the gunmen, and she and other mediators reported increasingly serious threats "to take the most serious measures" and begin shooting.

As the guerrillas' deadline neared, tensions at the scene were high after a fireworks-like sound from the theater around 3:30 a.m.

On Friday, the rebels released 19 hostages, including children as young as 6. Early today, a man and a woman were taken away by ambulance.

But the rebels refused to release dozens of other children and foreigners and issued more dire threats. Negotiators also reported little progress in persuading the Chechens to improve conditions for the increasingly desperate theatergoers, who were reduced to eating emergency stocks of chocolate bars and using the orchestra pit as a toilet.

Three Americans, as well as British, Dutch, German, Austrian and Australian citizens, were among those being held inside.

Putin, who blamed the crisis on "international terrorism," reacted testily to criticism of the government's handling of the crisis, calling on Russians to "refrain from political debates." The president, a former KGB agent who has cracked down on the independent media since taking office more than two years ago, called protests like those of the hostages' relatives on Friday "out of place and harmful now that we are talking about the suffering of hundreds of innocent people."

Nineteen hostages were released in several waves on Friday. First, at dawn, seven hostages left the building; no details about them were released. At midday, Red Cross officials brought out eight children from 6 to 12 years old. The children walked calmly to freedom, holding each other's hands. One young girl clutched a teddy bear.

On Friday evening, four more hostages, three women and one man, were released. Authorities said they were all from Azerbaijan, a largely Muslim former Soviet republic not far from Chechnya.

Following the blast at 3:30 a.m. today, a man, reportedly with head wounds, and a woman, apparently with stomach injuries, were carried out of the building.

Throughout the day and into the night Friday, wave after wave of negotiators entered the building to plead with the Chechens. Most came out empty-handed. The mediators included former prime minister Yevgeny Primakov; Yosif Kobzon, a popular singer turned politician; and Aslanbek Aslakhanov, the member of parliament for Chechnya.

Politkovskaya, a journalist who has defied the Russian government to produce reports on the Chechen war, returned from a U.S. awards ceremony to participate in the talks, personally hauling in water for the hostages.

But rather than reporting progress, some of the mediators suggested violence was at hand. Kobzon told reporters the Chechens had threatened to begin shooting hostages this weekend and quoted one as saying, "We are prepared to stay here a week, maximum."

"They reject any negotiations," said Sergei Govorukhin, a film director who spent 20 minutes in the theater building. He said the Chechens had refused to allow remaining children to leave and quoted them as saying "all the rest who come to them will be shot dead, whether they are deputies or journalists. It's a stalemate."

The rebels told Politkovskaya, "We're going to wait only a little while." Emerging at one point Friday, she added, "I was stunned to see the hostages' mood. They were preparing to die." She said the rebels' new offer to release the hostages was conditional not only on Putin beginning to withdraw troops from Chechnya but also on international verification of the move.

Foreign diplomats also attempted to negotiate the release of the estimated 75 foreign captives, but they, too, failed. U.S. Ambassador Alexander Vershbow came and left twice within four hours, buoyed by false reports that the Chechens were prepared to release the foreigners. Instead, U.S. Embassy officials said, the hostage-takers told an International Red Cross official they flatly refused to free the foreigners separately.

"We are very concerned that no other hostages have been freed and that the terrorists are not prepared to discuss the release of other hostages," Vershbow said.

Among the three Americans who were held was Sandy Alan Booker, 49, of Oklahoma City, his mother said in an interview. Jean Booker said she did not know her son was in Russia until Thursday afternoon, when she received a call from the State Department.

"I had heard a tidbit of news on television about some theater there in Moscow and so many hundreds were taken hostage," she said. "I wondered then where he was, but I never imagined he could really be caught up in all of this."

The two other Americans have been identified in media reports as Natalya Aleshnya and Irina Shearel, but U.S. officials provided no information about them or the one Russian with a U.S. green card among the hostages.

The group of about 40 Chechen rebels stormed the theater on Melnikova Street just after 9 p.m. Wednesday and interrupted the second act of a popular musical, "Nord-Ost." One woman was killed during the beginning of the attack.

Initially, a Chechen Web site carried a threat to blow up the building if the rebels' demand to end the war was not met within seven days, but on Friday they apparently shortened that timetable. According to one of the hostages, the Chechens said they would begin shooting the hostages at dawn today. The threat was relayed by cell phone from an actor in the musical who was among the captives, said Daria Morgunova, a spokeswoman for the theater.

One of the Chechen guerrillas inside the theater, speaking by telephone to Reuters news service in Ankara, Turkey, said they had "no intention" of freeing more hostages. The outcome of the crisis, he said, depended entirely on "Russia's leadership, on what agreement it can reach with our senior representatives." He said he and his fellow rebels "are feeling very well, we are in excellent form."

The hostage-takers, who had pronounced themselves ready to die, were led by Barayev, the nephew of a Chechen warlord who was killed last year. On Friday, NTV television broadcast footage of a man it identified as Barayev, wearing a black knit cap and a camouflage uniform, inside the theater. Russian officials charged that it was not Barayev but Chechen rebel leader Aslan Maskhadov who was behind the attack.

The Russian security services released a video of Maskhadov, apparently made this summer, in which he proclaimed a new "offensive" strategy on the part of the rebels. "I am certain that in the final stage there will be a still more unique action, similar to the jihad, that will liberate our land from the Russian aggressors," Maskhadov was shown as saying. His spokesman denied the video was related to the hostage-taking.

Correspondent Sharon LaFraniere and staff writer Ariana Eunjung Cha contributed to this report.

Russian troops escort a hostage from the Moscow theater where rebels had held about 700 people.Relatives of hostages who had been held by Chechens in a Moscow theater since Wednesday watched as police blocked protesters from joining them.Special forces officers make their way toward the theater. Early today, Russian sappers worked to disarm explosives the Chechen rebels had reportedly laid throughout the building, including on the seats and supporting pillars.Hostages are being evacuated in a bus from the theater in Moscow, where Chechen rebels had been holding theatergoers hostage since they raided the building on Wednesday night during the middle of a performance.Russian special forces troops remove bodies from the theater after it was stormed. Many ambulances also were seen in the secured area around the building.Rebel leader Movsar Barayev, 25, was killed in the early morning raid on the theater. Barayev was nephew of a rebel leader killed last year.