President Tito, creator of modern Yugoslavia and the first communist leader to break away from the Soviet Bloc, died today after a grave illness that lasted more than four months. He would have been 88 on May 7.

The announcement of Tito's death, in a hospital in the northwestern city of Ljubljana, was made by a nationwide television commentator who said in a halting voice: "Comrade Tito has died. His great heart stopped beating at 15:05 [10:05 a.m. EDT]."

The collective state presidency, designated by Tito to succeed him and composed of representatives of Yugoslavia's many different nationalities, went into emergency session. Its first act was to appoint Vice President Lazar Kolisevski, 66, as head of state.

Kolisevski will serve as modern Yugoslavia's second communist president for only about two weeks under a complex system of annual rotation of important posts. He will then be succeeded by the new vice president, Cvijetin Mijatovic.

Tito's body will be brought here from Lujbljana Monday on the luxurious Blue Train that he used for traveling in Yugoslavia. It will lie in state at the Federal Assembly building until burial Thursday in the grounds of his private residence.

Although the transition of power had taken place smoothly, this Balkan country of 22 million faces a complex variety of problems that include pressures from the Soviet Union and considerable internal divisions.

The Soviets have never reconciled themselves to Yugoslavia's defection, diplomats here say.

Apart from a strategic interest in gaining access to the Mediterranean, the Soviets would also like to eliminate Tito's ideological heresy, which other East Europeans find attractive. At the same time, Moscow would silence a Third World force that has opposed Soviet efforts to harness the nonalignment movement.

Observers here do not expect any Soviet military move. Rather, they say, Moscow may seek to exploit internal ethnic divisions to destabilize the post-Tito government and push it into the Soviet orbit.

Tonight, Yugoslav television underlind the theme of national independence by featuring events in 1948 when Tito defied Stalin and when Yugoslavia was expelled from the Soviet Bloc.

The broadcast included shots of Soviet tanks massing on Yugoslav borders at that time and pictures of the bodies of Yugoslav border guards killed in frontier incidents staged by Moscow in 1948.

In one particularly pointed excerpt, television viewers saw a later speech by Tito in which he declared: "In the same way as we fought [the Germans] in the war, we were ready to fight in 1948, are ready to fight now and will be ready to fight in the future too, when I am gone."

Outwardly Belgrade and other major Yugoslav cities remained calm as news of the president's death traveled fast.Many Yugoslavs first heard the news after returning home from mountain and seaside resorts following an extended May Day holiday.

Streets and restaurants emptied rapidly as people rushed home to watch television, which suspended normal programs and instead broadcast filmed tributes to Tito and reactions to his death. In street interviews, many people cried and expressed numbed disbelief when told the news.

A former partisan who served under Tito when he led a guerrilla uprising against Nazi occupation of Yugoslavia in World War II commented: "To think that this man has served all his life for the well-being of our people. He went on to the end of his days to make life easier for us."

The lengthy death vigil for Tito, which lasted three months longer than that for Spanish leader General Francisco Franco in 1975, has undoubtedly helped prepare Yugoslavs psychologically for the transistion. After an initial flurry of nervousness when Tito was first admitted to the hospital in early January, the new Yugoslav leaders have gradually eased themselves into their new responsibilities.

Even so, today's announcement of his death came as a considerable shock. Many people at first refused to believe the news.

Young people interviewed on television, who have known no other ruler, promised to remain loyal to Tito's policies of strict nonalignment in world affairs and a relaxed, consumer-oriented brand of communism at home.

In the final medical report, the president's panel of doctors revealed that he had been suffering from diabetes and kidney disease for many years. These problems, combined with arteriosclerosis, came to a head in December shortly before he was admitted to the Ljubljana Clinic, Yugoslavia's best-equipped hospital for heart and circulatory diseases.

In his first act as head of state, Kolisevski ordered seven days of mourning during which all flags will be flown at half mast and public events and entertainment canceled. Yugoslav newspapers rushed out special black-bordered editions commemorating the remarkable career of a man who took part in the Russian revolution, led a guerrilla uprising in World War II, and survived an attempt by Joseph Stalin to depose him in 1948.

Tito's funeral is likely to be the biggest state occassion of its kind since that of president John F. Kennedy in 1963. Among the world statesmen attending will be many leaders of the nonaligned movement, which Tito helped found in the late 1950s partly to strengthen Yugoslavia's own independence from the Soviet Union.

An administration source in Washington said it is "99 percent certain" that Vice President Mondale will represent the United States at Tito's funeral.

[In Peking, the Foreign Ministry announced Monday that Communist Party Chairman and Premier Hua Guofeng will head a special Chinese party and government delegation to attend Tito's funeral. Hua will also visit the Yugoslav Embassy in Peking to express his condolences, while flags in Peking and Shanghai will be flown at half-staff, the ministry said.]

Under the funeral arrangements, the people of Ljubljana will pay their last farewells to the president at the railway station Monday morning. A similar brief ceremony will be held in Zagreb, capital of Tito's home republic of Croatia. Commemorative ceremonies will be held in factories and institutions throughout the country on Tuesday.

Tonight, many Yugoslavs broke down and wept when told of Tito's death. Interviewed on national television, a Belgrade housewife summed up her feelings toward the only ruler she had known in her life: "What Tito has done for all of us has been to make us feel we were somebody in the world. Before him, we were a country that counted for nothing and we were poor. Now we feel that wherever we go we are respected."

A young student said: "Tito was much older than me, but I felt he understood me much better than my father, who is only half his age."

A young couple summed the feelings of many Yugoslavs by saying: "Although we were all prepared for Tito's death because of his long illness, we were stunned. We have lost a unique man whom it will be difficult to replace."