Edward Kardelj, the undisputed right-hand man of Yougoslav President Tito, died today at age 69. He had been expected to succeed Tito, who is 86.

An official government announcement said Kardelj died in a hospital in his home town of Ljubljana after being in a coma for 20 hours. His doctor said he was twice operated on for cancer of the liver and the lungs and that experts in the United States and Sweden were consulted when a cancer on his large intestine was first discovered in 1974.

Kardelj's passing will inevitably complicate the already complex internal situation this independent Communist country is facing in the twilight of Tito's long rule.

Tito, who is currently on a fournation Middle East tour, decided to cut short his stay in Jordan to fly back to Yugoslavia in time for Tuesday's state funeral. He described Kardelj as his closet associate and said his death would be an immense loss for Yugoslavia.

The government has ordered a threeday period of mourning throughout the country for the man whose long service and genuinely conciliatory qualities would have made him easily the most acceptable leader in the post-Tito era -- a period when Yugoslavia's fledgling political institutions could be severely tested both by internal nationalist divisions and external pressures from the Soviet Union.

Western diplomats believe that his lengthy illness, the severity of which became increasingly apparent over the last few months, has advanced the inevitable contest for power after Tito's death. Indeed there have been signs of a jockeying for position among the small group of ranking Yugoslav Communist Party officials.

In a move which appears linked to Kardelj's disappearance from the political scene, attempts have been under way to create a collective leadership to rule the country under Tito. According to Yugoslav sources, the campaign is designed at least partly to restrict the power of Kardelj's ambitious former protege Stane Dolanc, 53, who occupies the key post of secretary of the Communist Party Presidium.

Like Kardelj, Dolanc comes from the northwestern republic of Slovenia, and it was due to Kardelj's patronage that he was noticed by Tito and entrusted with the task of restoring order and discipline to the party after nationalist upheavals in the early 1970s.

At one point, it was assumed that in the event of Tito's death, Kardelj would become head of state while Dolanc -- who is known for his clear-headedness and organizational abilities -- would look after the party.

Dolanc's influence has been curbed by the adoption of new standing rules for the 24-man party Presidium, Yugoslavia's highest policy-making body. The rules provide for an elaborate system of checks and balances on the accumulation of power by any one Presidium member, except Tito.

Although widely acknowledged as the country's number two leader, Kardelj was for many Yugoslavs a slightly colorless, favorite uncle kind of figure who wrapped his thoughts up in ideological abstractions which were difficult to understand. They preferred the earthy, more direct way of speaking adopted by Tito.

With former vice president Milovan Djilas, Kardelj provided the theoretical justification for the historic split with the Soviet Union in 1948 when Yugoslavia became the first Communist country to pursue an independent road to socialism.

One aspect of this was the system of workers' self-management under which power in individual factories is vested in the workers themselves. This theory, which Kardelj put into practice, is regarded here as a major contribution to Marxist ideology.

Although originally conceived as a convenient way of distinguishing the Yugoslav brand of socialism from the Kremlin version, self-management changed the face of Yougoslavia. It allowed the dismantling of centralized planning in favor of a more rational market-type economy, leading to Yugoslavia's relative prosperity compared with the rest of Eastern Europe.

Apart from Tito, Kardelj was the only Yugoslav politician still in power to belong to the inner circle of Communist partisan leaders who directed the struggle against the Germans during World War II.

The other members of this tightly knit group are either dead or -- like the writer Djilas and the former secret police chief, Alexander Rankovich -- in disgrace.

Like Djilas, who was stripped of office in 1954, Kardelj was considered a liberalizing influence within the Yugoslav leadership. But unlike Djilas, he always sensed which way the political wind was blowing and knew that democracy and individual freedoms could only be secured step-by-step. While frequently calling for more debate between the Communist Party and other institutions, he was careful to rule out the introduction of a Western-type parliamentary democracy in Yugoslavia.

In an interview before a visit to the United States in September 1977, Kardelj revealed that he enjoyed reflective pursuits like gathering mushrooms (about which he was an acknowledged expert) fishing in mountain streams and listening to his large collection of classicial records.

It turned out to be the last newspaper interview he gave. Soon after returning from Washington, his health began to deteriorate sharply and he was rarely seen in public. He addressed the 11th Yugoslav Communist Party Congress in June 1978 to argue against a return to dictatorial methods proposed by hard-line party officials.

During his long career, Kardelj held virtually all important party and government posts including those of vice president and foreign minister.

Edward Kardelj was born on Jan. 27, 1910, to a tailor's family in Ljubljana. He joined the Communist Party at the age of 18 and was jailed for two years in 1930. Despite being badly treated by the royal police while under arrest, he refused to give any information -- one reason why he was able to gain Tito's trust and become one of his closest collaborators.

Between 1934 and 1937, he was in Moscow where he studied in the Comintern's international school and eventually taught there. Along wtih Tito, he was one of the very few Yugoslav Communists studying in Moscow who survived the Stalin purges.

During the war, Kardelj worked largely in Slovenia, where he organized resistance activities and acted as the link between the Slovene partisans and Tito's supreme command in the south. He played an important part in setting up a Communist-dominated provisional government of liberated Yugoslavia in 1943, in which he was appointed Tito's deputy and vicepremier. He retained this post at the end of the war when the new government was constitutionally established.

Kardelj's death creates a serious gap in Yugoslav politics which will be difficult to fill. The only obvious candidate for his role as ideologue and respected elder statesman is the Croat leader Vladimir Bakaric, 67, who suffers from bouts of tuberculosis and has largely withdrawn from active politics.