MOSCOW, DEC. 26 -- Just four days ago, Nikolai Ryzhkov was boasting that he was the only close collaborator of Mikhail Gorbachev still at the Soviet leader's side after nearly six tumultuous years of perestroika reforms. Today, his political career is effectively over.

The heart attack suffered by the 61-year-old Ryzhkov, who was appointed prime minister within six months of Gorbachev's rise to power, is a vivid demonstration of the pressures on Kremlin leaders as the Soviet crisis deepens. Political and physical exhaustion is taking its toll of the men who launched the Soviet Union on its great experiment in 1985.

The latest changes in the Soviet leadership coincide neatly with what Ryzhkov himself described only last week as the failure of perestroika to achieve its original goals. The prime minister complained that what started out as an attempt to rescue the world's second superpower from decades of drift and stagnation had degenerated into economic and social chaos.

The departure of Ryzhkov from the political scene and the unexpected resignation last week of Foreign Minister Eduard Shevardnadze symbolize a further changing of the guard in the Kremlin. For the second time in six years, the world will have to get accustomed to a new generation of Soviet politicians whose attitudes are difficult to predict.

The new men in the Kremlin are typified by people like Gennady Yanayev, 53, Gorbachev's vice presidential nominee. A colorless Communist Party bureaucrat who headed the official trade unions until earlier this year, Yanayev was regarded as a capable administrator with few political ideas of his own. At his first press conference, he spoke out strongly against a rapid transition to a market economy, arguing that it would lead to tens of millions of unemployed.

Shevardnadze, Ryzhkov and the other initiators of perestroika had their political differences, both with one another and with Gorbachev. What united them, however, was a recognition that the Soviet Union had reached a dead end under former Kremlin leader Leonid Brezhnev and a determination to lift the country out of its stupor.

The new leaders are likely to be less concerned with the evils of the Brezhnev era -- a period that seems almost like pre-history now -- than with mistakes committed since Gorbachev took over. As time goes by, it is becoming increasingly difficult to blame all the Soviet Union's problems on the legacy of Brezhnev, who died in 1982, and Joseph Stalin, who died in 1953.

This month's debates at the Congress of People's Deputies, the supreme Soviet legislative authority, suggest that a period of reaction against reformist influences could now be setting in. At a press conference today, Yanayev blamed Ryzhkov's heart attack on the "psychological pressure" brought to bear on the government over the past year. "The government's work was practically paralyzed by constant demands for its resignation," he said.

As the changing of the guard proceeds at the Kremlin, the biggest unknown is how Gorbachev himself will bear up under the increasing physical and psychological strain. The 59-year-old Soviet leader is a remarkably resilient politician who has repeatedly demonstrated his ability to bounce back from adversity. But there have been several occasions over the past few weeks when even he has seemed tired, dispirited, listless.

A glimpse into the grueling lifestyle of the top Kremlin leaders was provided in a recent interview with Ryzhkov's wife, Lyudmila, in which she complained that her husband frequently returned home exhausted. "What kind of rest can there be, when he leaves at 8 in the morning and returns no earlier than 10 in the evening, always bringing some kind of work back with him," she said.

A mild-mannered technocrat who made his early career as an engineer in defense industries in the Ural Mountain region, Ryzhkov frequently appeared to be on the verge of tears when criticized in the legislature. He depicted himself as the workhorse of perestroika, an economic pragmatist whose efforts were constantly being undermined by ideologues of the left and the right.

His last speech, which he delivered to the Congress last Wednesday, was permeated with a sense of failure and impending economic "catastrophe." "The country needs order, at least some breathing space," he said, suggesting that perestroika had started to go wrong in 1989 when Gorbachev decided to step up the pace of political and economic change.

"The scale of the country and the order of things that has been built up over the decades make it impossible to use shock therapy. It is sufficient to take just one imprudent step -- to deprive society of some guarantee or other -- and this will inevitably result in an explosion," Ryzhkov said.