President Boris Yeltsin, who led Russia out of the final throes of Soviet communism into a chaotic new world of democracy and a market economy, resigned unexpectedly today and appealed for "forgiveness because many of our hopes have not come true."

Prime Minister Vladimir Putin became acting president under Russia's constitution. The constitution also requires early presidential elections to be held within three months, and officials said they probably will take place on March 26.

Putin, the hard-nosed former KGB agent who has prosecuted Russia's war against separatist rebels in Chechnya, is Yeltsin's chosen successor. Polls show he is the overwhelming favorite to succeed Yeltsin, but others are also planning to run.

"Russia must enter the new millennium with new politicians, new faces, new intelligent, strong and energetic people," Yeltsin, 68, said in a televised address. "And for those of us who have been in power for many years, we must go."

Referring to Putin, 47, Yeltsin asked rhetorically, "Why should I stand in his way? Why wait for another six months?"

Yeltsin, Russia's first democratically elected president, was due to step down after his second term ended in June. His first term began in 1991 while Russia was still part of the Soviet Union.

In a brief handover, he watched as Putin received the special control suitcase with electronic gear used for monitoring a possible nuclear attack. After Yeltsin's departure, Putin signed an order giving him immunity from prosecution, as well as guaranteeing him a security detail, medical care and other benefits.

The resignation surprised leaders around the world, many of whom praised Yeltsin's support for democratic reforms but criticized his handling of the war in Chechnya.

President Clinton praised Yeltsin's "lasting achievement" in building democratic political institutions, but noted, "We have also had our differences, such as on Chechnya."

One explanation for Yeltsin's timing, analysts said, was the parliamentary election two weeks ago in which a new party closely allied with Putin grabbed the second-largest vote for the lower house, the State Duma. The results reflected Putin's commanding political position, and Kremlin strategists may have calculated that now would be the best time to call a presidential election.

Another factor may be Yeltsin's health, which has been declining for years. He has sometimes appeared disoriented in public, underwent quintuple coronary artery bypass surgery in late 1996, and has suffered several difficult respiratory illnesses and a bleeding ulcer since then.

Yeltsin failed to appear Thursday night at a Kremlin reception marking the turn of the century. This morning he arrived in his Kremlin office, signed the Russian budget and a law on presidential elections, and then submitted his resignation.

The decision bore no outward signs of sudden pressure by others on Yeltsin, although details of how he made the decision are not known. As Muscovites prepared for millennium celebrations tonight, there were no signs of instability on the streets. Putin, at a meeting of the Kremlin security council, vowed "there will never be any power vacuum."

Light snow dusted the spires and cupolas of the Kremlin as Yeltsin stepped outside at 2 p.m. in a fur hat and overcoat, shook hands with Putin, climbed into his Mercedes limousine and was whisked out of the fortress where he had ruled Russia for nearly a decade. His subordinates on the steps saluted farewell.

Earlier, in the television address announcing his departure, Yeltsin was seated alone in a large Kremlin hall that echoed with his voice, a fir tree lit in the background with holiday ornaments. His face was puffy, and Yeltsin spoke agonizingly slowly.

"I did all I could," he said, adopting a contrite tone. "I want to ask you for forgiveness because many of our hopes have not come true, because what we thought would be easy turned out to be painfully difficult," he said. "I ask you to forgive me for not fulfilling some hopes of those people who believed that we would be able to jump from the gray, stagnating totalitarian past into a bright, rich and civilized future in one go.

"I myself believed in this," he said. "But it could not be done in one fell swoop. In some respects, I was too naive. Some of the problems were too complex. We struggled on through mistakes and failures."

Yeltsin said he was retiring in defiance of his critics. "Many times I have often heard it said: 'Yeltsin will try to hold onto power by any means, he won't hand it over to anyone.' That is all lies. That is not the case."

He added that he would have liked to remain in office until the end of his term, a desire that as recently as last week his press secretary insisted was a matter of honor. "And yet, I have taken a different decision," he acknowledged. "I," he said, pausing for a long moment, "am standing down."

In a Kremlin videotape broadcast today, Yeltsin at first greeted a military officer in uniform, accompanied by another man in a suit and tie carrying the so-called "chemodanchik," or the nuclear suitcase. The device is a portable terminal that allows the Russian president in a nuclear crisis to monitor the situation; the actual launching of a strike would be ordered from the headquarters of the military general staff. The electronics are packed into what appears to be a black-and-silver attache case. Putin shook hands with the man bringing the case.

Yeltsin turned over to Putin a ceremonial signing pen and presidential seal. Later, Yeltsin, wearing a black overcoat, welcomed Putin into his Kremlin study, a rather large paneled room where Yeltsin has often been shown meeting with officials at a conference table. "Your study," he said to Putin, motioning toward the desk.

Finally, walking out of the Kremlin building, Yeltsin waved in an expansive half-circle and with a painful grimace on his face climbed into the waiting limousine.

Yeltsin, a one-time Communist Party boss in the heavily industrialized Urals Mountains region of Sverdlovsk, was Russia's dominant politician in the 1990s. His approach to power seemed rarely thoughtful but often instinctive. His subordinates often described him as power hungry, and jealous of any rival. He also was erratic and sometimes fell into depression, excessive drinking and long absences.

Yeltsin launched the 1992 market reforms that sought to quickly convert the centrally planned economy into a Western-style free market.

Yeltsin and the West also enjoyed a romantic period in which he was viewed as the personification of Russia's quest to transform itself. He is well remembered in the West for courageously leading the democratic opposition to a coup attempt against Mikhail Gorbachev in August 1991, four months before the Soviet Union was dissolved.

But as Yeltsin left office today it was remarkable how far he had slipped from those early days. The rhetoric of the Cold War is back in the air. Yeltsin's generals are again fighting separatist rebels in the North Caucusus. Instead of a free market, Yeltsin's final years in office saw the rise of a distorted market, one dominated by tycoons who held sway not only over Russia's natural resource wealth but also over the government itself. The all-pervasive corruption and lawlessness of the age had reportedly seeped into the Kremlin and allegations of wrongdoing also swirled around Yeltsin's family, particularly his daughter and close adviser Tatyana Dyachenko. It is not clear if the immunity Yeltsin was granted today will apply to his family.

Yeltsin, who had once been the epitome of vigor and energy, at the end was often hidden, isolated and ill at his country dacha.

Yet, Yeltsin's departure brought some tributes to his role in defending Russian democracy, no matter how imperfect, and in putting down the roots of a market economy, however warped.

"The conditions for democracy were created by Yeltsin," said Irina Khakhamada, a leader of the liberal Union of Right Forces party, who noted that he had put most of the economy in private hands. "There exists a legitimate parliament, there are direct presidential elections. And no matter who comes to power now, he would have to organize a total military coup, drowning the entire society in blood, because there is no other way of switching to another regime."

"The role of Yeltsin in our history?" said the ultranationalist Vladimir Zhirinovsky. "I can evaluate it only positively. He gave freedom. It is most important. Millions of people can travel abroad . . . and here in the country you can do everything."

Moscow Mayor Yuri Luzhkov, once an ally of Yeltsin's who later was targeted by Yeltsin's aides for a smear campaign, said Yeltsin's departure was "overdue" and probably the result of his declining health. "Yeltsin has taken the right decision," he said.

Putin has earned very high public approval ratings since he responded to a series of terrorist bombings in September with an all-out military offensive in Chechnya. But he may still face some competition in the presidential campaign. Among those who have said they will run are former prime minister Yevgeny Primakov; Yabloko party leader Grigory Yavlinsky; and Zhirinvosky. Communist Party leader Gennady Zyuganov, whom Yeltsin defeated in 1996, may also run again.

But Putin will have overwhelming advantages as acting president, including control over the airwaves, both through state-owned television and the most powerful channel, ORT. It is controlled by tycoon Boris Berezovsky, a Yeltsin ally who was elected earlier this month to the State Duma.

HIGHLIGHTS OF YELTSIN'S POLITICAL LIFE

1985

* December: Soviet leader Mikhail Gorbachev appoints Boris Yeltsin party chief for Moscow.

1987

* October/November: After complaining about slow pace of economic reforms, Yeltsin is accused of grandstanding and is fired as Moscow party chief. He is hospitalized with a heart condition.

1988

* Feb. 18: Dropped from Politburo.

1989

* March 26: Makes surprise comeback in election to Soviet Parliament.

* September: During Yeltsin's first U.S. visit, media report he drinks heavily and appears unsteady.

1990

* May: Elected chairman of the Russian parliament, effectively making him president of Russia. Later quits Communist Party.

1991

* June: Wins Russia's first popular presidential election.

* Aug. 18: Hard-liners attempt a coup against Soviet President Gorbachev. They put Gorbachev under house arrest.

* Aug. 21: Coup attempt collapses. Yeltsin emerges as the country's most powerful and popular politician.

* Dec. 8: Yeltsin, and leaders of Belarus and Ukraine, declare Soviet Union extinct and form a new Commonwealth of Independent States.

* Dec. 25: Gorbachev resigns.

1992

* January: Yeltsin begins to dismantle 75 years of Communist policies by lifting price controls on many goods.

1993

* Oct. 3: Declares state of emergency in Moscow after supporters of hard-line parliament overwhelm riot police, seize government buildings.

* Dec. 12: Voters approve new constitution giving Yeltsin sweeping powers and guaranteeing private property, free enterprise and individual rights.

1994

* Dec. 11: Yeltsin sends troops into Chechnya to quash independence bid.

1995

* July and October: Hospitalized with heart disease.

* December: Communists win big in parliamentary elections.

1996

* July 3: Yeltsin wins reelection despite disappearing from public view for final week before the vote, because of heart trouble.

* Nov. 5: Yeltsin undergoes heart surgery at the Moscow Cardiological Clinic after temporarily transferring power to Prime Minister Viktor Chernomyrdin.

1997

* Jan. 8: Yeltsin is hospitalized with pneumonia shortly after returning to work at the Kremlin. He remains away from his office for several weeks.

1998

* March 23: Yeltsin fires the Cabinet and chooses Sergei Kiriyenko, a little-known, 35-year-old technocrat, as the new prime minister.

* August: Russia defaults on some internal debts and devalues the rubel, setting off a severe economic crisis. Yeltsin ousts Kiriyenko.

* Sept. 10: Yeltsin nominates Foreign Minister Yevgeny Primakov as prime minister.

* October: Yeltsin says little about the country's economic crisis and rarely appears in public. He cancels, or cuts short, several foreign trips and enters a clinic to recuperate from what is described as high blood pressure and exhaustion.

1999

* January: Yeltsin rushed to hospital with bleeding stomach ulcer, which keeps him out of public view for weeks.

* May 12: Yeltsin fires Primakov, and names Interior Minister Sergei Stepashin as a replacement.

* May 15: He survives impeachment vote in parliament over Chechnya.

* Aug. 9: Yeltsin suddenly fires Stepashin without citing any reason and names Vladimir Putin acting prime minister.

* Sept. 30: Russia sends ground troops into Chechnya.

* Dec. 31: Yeltsin announces his resignation and says elections will be held in 90 days for a new president.

SOURCES: Associated Press, Reuters

CAPTION: Boris Yeltsin waves as he leaves the Kremlin after his surprise announcement that he was resigning before his term ended and handing over power to Prime Minister Vladimir Putin. New elections must be held within 90 days.