“They pretended that the Chechens were just fighting among themselves,” he said, “but the whole thing was organized by Russia, mainly the F.S.K.,” the domestic intelligence agency that succeeded the K.G.B., with the connivance of the military.

Andrei Rusakov, an army captain among the 20 or so Russians captured, told how he had signed a secret contract in which the F.S.K. — now called the F.S.B. — offered him several thousand dollars to take part in the phony Chechen opposition attack.

The revelation of the security service’s failure prompted public gloating by Russia’s military. Pavel S. Grachev, the defense minister, stated on television that the armed forces could have taken control of Chechnya with “one paratroop regiment in a couple of hours.”

His boast quickly came back to haunt him, when Mr. Yeltsin ordered the military to invade. The disastrous performance of the armed forces made Mr. Grachev perhaps the most reviled man in Russia, amid accusations that he had pushed for a military solution simply to disperse the whiff of corruption around him and his ministry.

After the failed New Year’s Eve attack on Grozny, Russian forces pounded it relentlessly from the air, an orgy of destruction that Chancellor Helmut Kohl of Germany denounced as “sheer madness.” The Russians finally captured the city, but as the war ground on amid horrendous brutality on both sides, Chechens recaptured it the following year, and laid siege to Russian forces in other major towns.

In August 1996, Gen. Aleksandr Lebed, Mr. Yeltsin’s national security adviser, reached an agreement with the Chechens to stop the fighting. Mr. Yeltsin, increasingly infirm, erratic and under siege politically, initially balked at the deal, which effectively acknowledged Russia’s defeat, but ultimately endorsed it.

“The main thing,” he said, “is that bloodshed has been stopped.”