He thought it would be a quick little war, won in a matter of weeks: just rub out the bad guys in the outhouse, as he put it. Three years later, Vladimir Putin came face to face with the lingering consequences of the not-so-quick, not-so-little war that vaulted him to the presidency.

The standoff with Chechen rebels holding a theater audience hostage not far from the Kremlin quickly became a defining moment for Putin, a test that could determine whether he continues to enjoy the admiration of the Russian people or sees his mastery of the political establishment begin to unravel.

The crisis presented Putin with nightmarish scenarios. "Fighting is out of the question in the middle of Moscow. On the other hand, compromising with terrorists . . . is also impossible for Putin," said Igor Bunin, director of the Center for Political Technologies, a Moscow research group. He spoke on Friday, before Russian troops stormed the theater and killed the leader of the Chechen rebel group that had seized 700 hostages.

A political establishment that had blithely ignored the tiresome war had suddenly found the conflict squarely in its own backyard. Even before the crisis reached its climax early this morning, Putin was under serious domestic criticism for the way he had handled it.

As the tension built at the theater, analysts compared Putin to President Jimmy Carter during the Iran hostage crisis, while politicians and newspapers lashed out bitterly against the failure of Russian security services to prevent the band of about 50 heavily armed fighters from taking over the crowded theater and threatening to blow it up.

At the same time, if most of the hostages are freed, it could provide Putin with another boost to his fortunes at home. It appeared early today that a bloodbath may have been averted by Russia's decision to invade the theater immediately after two hostages were killed.

There were reports that most of the rebels were killed or captured, and bombs inside the theater were disarmed. The next few days could be critical as details emerge about the cost in human life and the conduct of troops and negotiators.

Earlier, the majority of shocked Muscovites blamed the crisis on the government -- 53 percent, compared with 16 percent who held Chechen militants responsible -- according to a poll issued Friday by the Center for Russian Public Opinion and Market Research (ROMIR). Two-thirds of the respondents indicated that they wanted Putin to end the theater standoff through negotiation, not force.

The Chechen conflict has figured prominently in Russian politics for a decade. Boris Yeltsin was hobbled by his failure to subdue separatists during the first war there, from 1994 to 1996, and it left him deeply damaged when he withdrew troops. He later described his handling of the conflict as his gravest mistake.

Putin set out to avoid that precedent. Plucked out of obscurity by Yeltsin to become prime minister when tensions again began heating up in Chechnya, in 1999, Putin dispatched troops there after Chechen militants were blamed for apartment building bombings centered mainly in Moscow that killed 300 people.

He vowed to put down a Chechen uprising within two weeks and soared to popularity with a public that saw him as a decisive commander and quickly rewarded him by electing him to succeed Yeltsin in 2000. Putin's extraordinarily swift ascent to power was based on an image that he had restored Russian pride after the humiliating chaos of the Yeltsin years.

However, the war dragged on for two years, despite Putin's repeated declarations of victory. About 80,000 troops remain in the region trying to fight elusive guerrillas, and while they control territory, they do not control the republic.

Lately Putin has tried to "normalize" the situation by promoting the creation of a new constitution and the restoration of elections. But he has effectively ignored all peacemaking efforts, even though he has said he is open to "all contacts," a position he repeated Friday.

Public support for the long-running battle has waned significantly. One reason is the heavy toll in casualties. During the last three years, at least 4,000 soldiers have died, according to official statistics. Human rights groups say the number is 14,000. As many as 80,000 Chechens have died, including fighters and civilians, while another 35,000 have disappeared, human rights groups estimate.

At the same time, Putin has enjoyed public approval ratings as high as 70 percent and there is little sympathy among the Russian public for the Chechens.

Chechens and other dark-skinned people from the Caucasus have often suffered mistreatment at the hands of Russians, who are Slavs. The racial factor, the Russian military casualties and previous Chechen attacks on civilian targets have deepened the distrust of Chechens among Russians.

The fate of 700 theatergoers has galvanized this city in a way that earlier crises did not. People who had never talked much about Chechnya before were suddenly consumed with it and demanding a solution.

Dmitri Yermoltsev, 30, a schoolteacher with two teenage students trapped in the theater, joined colleagues in writing appeals to Putin to end the war. "The war in Chechnya hasn't been the talk of people recently," he said. "It went to the background of people's consciousness. A lot of people today are saying, 'Why are we keeping silent? It's high time we do something about this.' "

Yermoltsev said he has long opposed the war, but this brought it home in a frightening way. "For the first time, I'm involved personally because I have students held hostage in the theater," he said.

Vitaly Dozhikov, 44, a stone cutter, said the hostage situation made him angry at the Chechens for the first time and less sympathetic to their situation. "I feel like blowing up all of Chechnya," he said. "We have lost too many of our own."

A co-worker, Andrei Odintsov, 25, said he hoped the Russian government took a cue from the United States. "Even after what happened in the World Trade Center, the Russians didn't pay attention," he said. "We must take steps to stop this."

Staff writer Ariana Eunjung Cha contributed to this report.

Vladimir Putin has been under intense domestic criticism for his handling of the war in Chechnya.