Now that Yugoslavia's Marshal Tito is dead, his role as the symbol of independence within the world communist movement is up for grabs.

Romania's President Nicolae Ceausescu appears to aspire to the part -- but he must overcome serious obstacles before he could inherit Tito's mantle.

In many ways, Ceausescu has diligently understudied his Balkan neighbor. Like Tito, he has championed the cause of national independence and cultivated good relations with the West, China and the Third World.

But there are also serious obstacles in the way of the Romanian leader becoming a second Tito -- and they have become increasingly apparent over the last few months. The collapse in East-West detente has revealed some of the constraints on Romania's much-vaunted independent foreign policy.

Despite superficial similarities, there are big differences between the two Balkan countries. Yugoslavia, which broke away from the Soviet Bloc in 1948, is a nonaligned country -- and accepted as such by the Kremlin. bRomania, with its 830-mile-long common border with the Soviet Union, remains a fill member of the Soviet-led Warsaw Pact military alliance and the East European trading organization Comecon.

While Ceausescu's approach has undoubtedly annoyed Moscow at times, he has been careful never to threaten what Soviet leaders perceive as their basic security interest.

In Romania's case, there has never been any cause for a Soviet invasion on the lines of Hungary or Czechoslovakia. But that ultimate weapon is there should the Soviets wish to use it. And in contrast to Yugoslavia, Romania has little possibility of putting up an effective resistance to an invasion or summoning Western aid.

Occasionally, Romania's independent stand is even useful to the Kremlin by providing a door for contacts with the West and countries like Israel that do not have relations with the rest of the Soviet Bloc. Most recently, Ceausescu has acted as a kind of East-West sounding board on proposals for a political settlement over Afghanistan.

Ceausescu's domestic policies also differ markedly from those pursued by Tito. Yugoslavia's defiance of the Kremlin led naturally to a softening of internal controls. Ceausescu, by contrast, has invoked Romanian nationalism as an excuse for maintaining tight reins.

The difference in the two countries' international positions has been reflected in their responses to the Soviet invasion of Afghanistan. The Romanian press has preserved almost total silence on the crisis -- unlike the Yugoslavs who have kept up a constant barrage of criticism against Moscow.

Experienced observers here are convinced that Ceausescu's long-term goal remains the securing of as great a degree of autonomy for Romania as possible. But, for a mixture of political and economic reasons, he is keeping his head down at present.

Alone among Soviet Bloc states, Romania has never endorsed the presence of Soviet troops in Afghanistan. It neatly sidestepped the United Nations' ballot on the issue in mid-January by not showing up for the vote. Since then, however, Ceausescu has sent a warm "message of friendship" to the Soviet-backed regime of Babrak Karmal in Kabul and signed a joint Warsaw Pact declaration calling for a political solution.

The contrast with November 1978, when Ceausescu put on record his refusal to agree to a Kremlin demand for increased defense spending, is marked. In the space of 18 months, Romania's relations with the Soviet Union have swung from outright defiance to sullen compliance.

As one analyst commented: "During periods of detente, the Romanians can afford to be more independent. At times of polarization, they have to adhere much more closely to Moscow's orders."

A small country situated on natural communications routes between East and West, Romania has traditionally been exposed to foreign domination.

After years of forced Russification after World War II, Romanians began emphasizing their ethnic distinctiveness -- "an island of Latins surrounded by a sea of Slavs" -- in the early 1960s. But the startling break came in 1963 when Ceausescu's predecessor as Communist Party leader, Gheorghe Georghio-Dej, dramatically rejected Soviet plans for economic integration.

Georghiu-Dej displayed considerable skill in judging how far he could push the Soviets without provoking retaliation. Ceausescu, too, has proved an expert at extending the limits of Soveit tolerance, but also at knowing when it is prudent to keep quiet.

Romania's signature of last month's Warsaw Pact declaration means that the entire Soviet Bloc now has a common public position on Afghanistan.

Ceausescu's balancing act is complicated by mounting economic problems -- and particularly a serious energy shortage. Itself an oil producer, Romania has traditionally not relied on Moscow for its energy needs. But last year it purchased a modest amount of oil -- believed to be around a million tons -- from the Soviet Union.

It is against this background that Romanian Prime Minister Ilie Verdet travelled to Moscow recently for talks on long-term economic cooperation with the Soviet Union. Unusually for a visit of this kind, he was received personally by Soviet President Leonid Brezhnev and given what aims described as "an exceptionally warm welcome."

Back home, hints were being dropped that Romania may have to revise its strong opposition to Soviet demands for increased military spending. A senior Romanian diplomat expressed disappointment at Western countries which, he said, applauded Romania's stand in 1978, but then went on to increase their own defense budgets.

"It is becoming increasingly difficult for us to defend our position. We too have to think of our own defense," he said.

Clearly Ceausescu is not about to surrender Romania's hard-won position of relative autonomy within the Soviet bloc. But equally, in present circumstances it is hard to imagine him being allowed to follow all the way in Tito's footsteps.