With an intriguing mixture of intense ideological commitment and hard-nossed economic pragmatism, Mozambique is quietly making a bid to become black Africa's first successful Marxist state.

It is not the first to try. Mali, Ghana, Guinea, the Congo, Somalia and Tanzania have gone before Mozambique in seeking to graft the doctrine of Marxism-Leninism onto their reluctant peasant-based societies. After anywhere from 10 to 20 years of trial and error, it cannot really be said that any has succeded. Some, like Mali and Ghana, have given up trying altogether.

Still, the quest to establish the Kingdom of Marx and Lenin on African soil continues unabated here as in Ethiopia, Angola, Benin and Guinea.

"Sometimes it seems like the only true believers left are here in Africa." remarked one cynical Western observer.

However, many European and American intellectuals, though dis-heartened by the results of the African attempt at socialism so far, are now drawing new hope from Mozambique.

"If they cannot do it here, then there is no hope any longer anywhere in Africa," said a Swedish journalist whose government is one of the largest donors of aid to Mozambique.

Probably the main reason for this faith is that the ruling Front for the Liberation of Mozambique (Frelimo) had considerable experience in organizing people's lives along socialist lines in the "liberated areas" it established during its 10-year war against the Portuguese colonial army in northern Mozambique. By the end of its struggle in late 1974, the front had nearly 1 million Mozambican - one-tenth of the entire population - under its authority, most of them living in communal villages.

But what is gaining Frelimo particular respect even in Western diplomatic circles here is the unusual degree of pragmatism it is displaying in its unavoidable dealings with South Africa and its interest in Eaving good relations with the West as well as the East.

Since Mozambique signed a treaty of cooperation and friendship in April with its "natural ally," the Soviet Union, it has turned noticeably to the task of improving its ties with Western nations, especially the United States, which has already provided $23 million to $25 million in financial and food assistance.

Frelimo is also reported to be seriously considering membership in such "suspect" Western institutions as the World Bank and the Common Market's Lome grouping, a move that would open the doors to massive Western economic assistance.

Even private investment from American multinationals in partnership with the state is now part of government thinking about the way Mozambique should go about its development.

Frelimo has only been running the country for about 2 1/2 years now, and it is therefore far too early to draw any conclusions about the success or failure of the Marxist experiment here. New institutions, like "People's assemblies," state farms, and the aldeis communais, or communal villages, are just being established on a nationwide basis.

Meanwhile the nationalist guerrilla war under way in neighboring Rhodesia has spilled over into this country, diverting time and energy to defense problems. The war has also increased the dislocation of the economy, already badly deflated by the flight of 200,000 Portuguese.

The lates U.N. report on Mozambique calculates that the cost of the Rhodesia war in damage to Property, roads and communications now stands at $87 million. This does not include, however, the price of food imports expected to total 180,000 tons for only the first six months of 1978.

Indeed, on first glance at the statistics, Mozambique appears to be something of an economic basket case. It is expecting to run a $279 million deficit in its balance of payments this year and as much as $185 million next year. Meanwhile, the 1977 government budget deficit is estimated at $120 million, more than one-third of total expenditures.

Yet, there is no air of despair or impending economic bankruptcy either here in the capital or elsewhere in the country. Rather, there is an impressive dedication to overcome the legacy of 400 years of Portuguese colonialism, the doldrums of the post-independence economic collapse and the new ravages of the Rhodesian war.

Despite its meagre means, the government is tackling head-on the problem of reviving production and introducing badly needed changes in the existing national systems of education, bealth and welfare.

Even Western economists now believe that the downward winding economy has finally bottomed out and that there are signs of an upswing in production in some items, like cotton and cashew nuts, the country's main export. Activity is steadily picking up in Maputo's port, though not yet in the port of Beira, and a major expansion in coal production is under way.

While economists early this year regarded the government's target date of 1981 for restoring industrial and agricultual production to its pre-independencel level, as unrealistic, some now feel it may be possible after all.

They are particularly encouraged by the priority now being given to boosting agricultural production, partly through the restoration of the more than 2,000 abandoned Portugueses farms and partly through exhoration to hard work in Chinese-style "socialist emulation" campaigns.

Still, tough times for ordinary Mozambicans are not altogether over. Long lines are once again seen in front of shops here and in other cities for some key items like cooking oil, soap, bread and sometimes cornmeal.

The government blames mainly "economic sabotage" by enemies of the revolution for the reapearance of the long lines. But Western economists say the problem is more complex, involving big drops in production, acute internal transportation problems and bottlenecks in the already distrupted distribution system.

The price of clothing also remains high and car or bus transportation is generally lacking throughout the country.

None of the problems are hidden from public discussion or minimized in the media. Indeed, there is a spirit of self-criticism and open debate that is lacking in most other African socialist countries. This self-assuredness is reflected in Mozambique's changing policy toward Western, and even a few South African, journalists.

Unlike Angola, Ethiopia or Guinea, where the doors are closed to the Western press most of the time, Mozambique is allowing at least some non-Marxist correspondents to travel fairly freely through the country and to see what is going on for themselves.

One result of this open door policy has been to thoroughly discredit reports circulating in South Africa, Rhodesia and Portgual of a significant opposition developing Frelimo's rule, particularly in the north.

More than half a dozen Western reporters, including this one, who recently traveled extensively through parts of northern Mozambique, saw no sign of tension or any overt opposition and heard only vague reports about a covert one.

There were few soldiers to be seen, except toward the border areas, and no armed guards were assigned to protect them. Sometimes a local Frelimo offical traveled along with the journalist, but at other times the soldiers simply provided a pass, driver and car.

The one road more closely guraded was that between Beria and Chimoio (formerly Vila Pery) in central Mozambique, where there were four lightly manned checkpoints. The previous week, the Rhodesians had carried out their biggest incursion ever into Mazambique, hitting nationalist guerrilla headquarters just outside Chimoio.

As best as could be determined, it apeared that anti-Frelimo electments who do periodically strike inside the country are mainly an extension of the Rhodesian army's special raiding commando units.

Meanwhile, Frelimo seems to be steadily strengthening its hold over the 10 to 11 million mostly peasant population living throughout this sprawling Indian Ocean land, twice the size of California.

In early December, the party wound up a 2 1/2-month election campaign for the new "people's assemblies" in 900 rural and urban constituencies, called local idodes, as well as in the cities, 10 provinces and at the national lveel. For Frelimo, the assemblies are the basis for establishing poder popslor, or "people's power," one of the main objectives of its revolution.

For the first time in Mozambique's history, there was universal suffrage for everybody except known former agents or supporters of the Portuguese colonial system. This was in contrast to the last elections in 1973, when only 160,000 persons, including the Portuguese, had the right to vote, although 50,000 failed to do so.

The party-controlled local media made much of the large number of candidates rejected by the people in a show of hands vote - about 1,800 of the 8,000 deputies in the local idade assemblies. For Frelimo it was clearly the best proof that grassnoois democracy was at work in the country.

Some of these "rejects" were exposed at public meetings as former Portuguese police or army agents. But the vast majority seemed to have been turned down by they oters for being either drunkards, mistreating their wives or children, or indulging is "serual corruption," adultery of polygamy.

Westerns living here, including many generally skeptical diplomats, found the elections at least at the local level an impressive display of Frelimo's growing outreach to the people, even those living in remote rural areas.

By contrast, most outsiders, including many Portugures leftist intellestuals, were left generally unimpressed by the largely rubber stamp indirect elections (through electricale olleges.) held for the higher people's assemblies including the national one.