President Tito tonight reportedly underwent his second major operation within a week as plans went ahead to ensure an orderly transition of power in Yugoslavia if he dies.

There was no immediate news about the outcome of the operation, which was confirmed by unofficial sources. But medical sources said it probably involved an amputation following failure of an attempt last weekend to bypass a blood clot in his left leg.

Officials confirmed reports that gangrene had begun in the toes of Tito's left foot, strengthening speculation about the inevitability of an amputation -- which the former partisan leader was originally believed to have resisted.

The second operation marked the most critical moment so far in the career of a man widely regarded as being the last surviving political giant to emerge from World War II. It coincided with a strong -- and most unusual -- statement of support for Yugoslavia from its traditionally maverick neighbor, Albania.

Before the 87-year-old Yugoslav leader entered the operating room at the clinic in the Slovenian capital of Ljubljana, his two immediate deputies were summoned to his bedside.

According to the constitution, if President Tito dies, his functions as head of state and president of the Yugoslav Communist Party will be taken over by two collective bodies. The chairmen of these bodies -- Lazar Kolishevski and Stevan Doronjski -- flew to Ljubljana to help decide whether to risk renewed surgery.

Yugoslav officials, meanwhile, said they were encouraged by a pledge from Albania to fight alongside Yugoslavia in the event of a Soviet invasion. The Albanian leader, Enver Hoxha, 72, has been a bitter foe of Tito in thte past -- but he evidently feels that the time has come to sink their differences.

Albania now has no powerful communist ally following its scrapping of successive alliances with Yugoslavia, the Soviet Union and China. Hoxha now obviously regards Moscow as a more dangerous enemy than Belgrade.

Many ordinary Yugoslavs share Hoxha's concern about Soviet intentions in the Balkans after Tito's death. Nevertheless, most foreign observers agree that any over Soviet action against Yugoslavia at this time is unlikely.

The Soviet leaders know that any invasion of Yugoslavia would be met by determined resistance from a united population, quite apart from the risk of involving all of Europe in a full-scale war.

Over the last few years, Tito himself has frequently raised the question of what will happen in Yugoslavia "after I am gone." Dismissing speculation of an invasion as "utter nonsense," he has referred again and again to the need for Yugoslavia's many different nationalities to "preserve brotherhood and unity."

As Yugoslavs face up to the prospect of the first transition of power in 35 years, Tito's analysis seems remarkably accurate. For all the flurry of Western concern over a new mood of expansionism in the Kremlin, the real threat to Yugoslavia's long-term stability would appear to come not from without, but from within.

More likely is that the Kremlin might try from behind the scenes to exploit divisions and national hatreds within Yugoslavia. This is a country which did not even exist before World War I and was torn apart by bloody civil strife during World War II. But a strategy of subversion could succeed only if internal strains were to develop first.

Predictably enough, the immediate effect of Tito's illness has been to unite the country. Officials are pointing to a sharp rise in the number of applications to join the Communist Party over the past week as an upsurge of patriotism. Even the dissident groups have called an unoffficial truce in their battles with the authorities.

For ordinary Yogoslavs accustomed to thinking of Tito as indestructible, the crisis has come as a psychological shock. There is a mood of uncertainty -- and the sense of being thrust out into the big wide world without the traditional father figure for protection.

A Belgrade intellectual frequently critical of Tito in the past summed up the feelings of many Yugoslavs: "Whether we liked him or not, we can't get away from the fact that we are the children of his epoch. It's as though we are all about to become orphans."

There is a broad consensus in Yugoslavia on the need to continue Tito's policies of nonalignment abroad and an idiosyncratic free market brand of socialism at home. The problem is that Tito has always been regarded as the lynchpin of the entire system: without him, might not everything fall apart?

At key points in Yugoslavia's stormy postwar history, the president stepped in to save the country's independence and unity. In 1948 he became the first communist leader to defy the Soviet Union and in the early 1970s he put down an upsurge of nationalism in the northwestern republic of Croatia.

Whether any other leader unable to draw on Tito's immense presitige could have successfully done the same is doubtful. In order to appease national sensitivities, particularly among the Croats, power in Yugoslavia has now been largely devolved to the separate republics -- and most politicians represent their own, ethnic group rather than the country as a whole.

Tito himself has on several occasions spoken of the role of Yugoslavia's 250,000-man army in keeping the country united in the event of another major crisis. The army, he has said, is responsible for defending not just Yugoslavia's borders, but its constitutional order as well.