This continent, strewn with the human victims of economic failure, is claiming an ideological victim as well.

African socialism, born and raised as the privileged offspring of the independence decade of the 1960s and grown to maturity in the Marxist-Leninist states of the 1970s, has been dispossessed and increasingly rejected in the squalor and turbulence of the 1980s.

Two weeks ago Tanzanian President Julius Nyerere, one of the founding fathers of African socialism, announced the lifting of his country's 14-year ban on private ownership of rental housing and a plan to sell off many state-owned farming estates to private businessmen.

The self-proclaimed Marxist state of Mozambique recently drafted a new private investment code, lowered taxes and eased import and export controls in a bid to attract foreign capitalists. It is one of several African states seeking investment from multinational firms they once viewed with open hostility. Similarly, Zimbabwean Prime Minister Robert Mugabe, who calls himself a Marxist-Leninist, mentioned socialism only twice in his annual address to the nation in April, and then only to assure his audience that his socialist goals would be achieved "by education and persuasion and not by imposition and compulsion."

Many reasons lie behind the retreat from socialism. One is the failure of socialist-oriented governments such as the ones in Tanzania and Zambia and Marxist states such as Ethiopia to meet their people's basic needs. Another is general disenchantment with the Soviet Union, which has not been able to supply sufficient funds and other resources beyond arms to allies such as Ethiopia, Angola and Mozambique and which ideologically has often treated those nations as well-meaning but impressionable children rather than full-fledged socialist partners.

But the most compelling reason is sheer survival. Many countries practicing socialism, whether of Nyerere's "humanistic" variety or the more ideological Marxist mode of Angola and Mozambique, are facing economic disaster and groping for new ways to stimulate growth. Increasingly they are forced to turn to the West for capital and for ideas.

About 10 of Africa's 50-odd nations call themselves socialist and another eight refer to themselves as Marxist. But the list includes such anomalies as Zimbabwe, whose leadership considers itself Marxist even while the country functions under a mixed, often capitalist-dominated economy.

Like Nyerere, many of these leaders turned to socialism in the late '60s and early '70s after the first decade of independence when they decided that capitalism had produced "growth without development," that is, increases in the gross national product but not better living conditions for the vast majority of their people.

Few leaders are willing to concede publicly that they now are retreating from the socialist model. But the impact of the steps many are taking is clear.

"We've been living beyond our means," said Tanzanian Finance Minister Cleopa Msuya, one of those overseeing his nation's policy reforms. "Cutting costs is neither socialism nor capitalism; it's just common sense." But, he added, "those who are realists can see the country is moving in a new direction."

A key feature of that new direction has been a move away from economic centralization. Once a prime goal of the newly formed countries of Africa, centralization was designed in theory to mobilize all of a nation's thin resources for the push toward development.

In practice, centralization often led to bloated and corrupt bureaucracies and state-controlled companies in national capitals run by poorly trained officials who had little or no idea of needs and priorities in the countryside, where most Africans live.

In many countries, central planning started as a watchword and soon became a farce. Mozambican officials never even bothered to publish their last five-year plan, which was designed in 1981 and scrapped the same year. Planning officials here were conceding that Zimbabwe's last three-year plan was out of date even before it was announced in 1983.

Part of the problem with socialism in Africa is that no government ever has defined it firmly. The early rulers of independent Africa, including Nyerere, Ghana's Kwame Nkrumah and Zambia's Kenneth Kaunda, sought to create a special brand of distinctly African socialism that was classless, agrarian and noncoercive and that harked back to the precolonial days when, it was claimed, a sort of pastoral communism flourished in Africa. But while Nkrumah moved increasingly toward a Marxist model, Kaunda tried to build a massive welfare state based on the earnings of one industry -- copper -- while Nyerere eventually opted for a complete overhaul of Tanzania's countryside by compelling peasants to relocate in collectivized villages.

All three models failed: Nkrumah's when he was overthrown, Kaunda's when the copper wealth ran dry and Nyerere's when peasants rebelled against forced moves and low farm prices by withholding their crops from the official marketplace.

In other nations, socialism began not as a program but as a response to perceived repression. Since white-minority governments in countries such as Angola, Mozambique and Zimbabwe called themselves capitalist, their black guerrilla opponents quickly identified themselves as socialists.

"To be a socialist meant to be opposed to the white-minority regime and to racism," said Willie D. Musarurwa, editor of the Harare Sunday Mail, who spent 10 years behind bars under white-minority rule here. "It had very little to do with real ideology or economics."

But after independence, translating liberation-movement slogans into governmental realities proved extremely difficult. Orthodox Marxism, with its belief in a broad, functioning working class and a small, vanguard revolutionary party as prerequisites for socialist transformation, often seemed less than relevant to an Africa that lacked industry and resources and whose political parties generally were mass organizations embracing many social classes and ideologies.

Even the Soviet Union, which encouraged the spread of communism in Africa, could not bring itself to call its new Marxist proteges "socialist." Instead they were labelled "socialist-oriented," a tag many African Marxists viewed with contempt.

Africa's economic agony has led even the most doctrinaire Marxists to rethink their policies. Angolan officials have said their Soviet economic advisers have encouraged them to turn to western transnationals such as Gulf Oil for new capital during what they describe as the "transition period" between the colonial past and a socialist future.

Marxists and other radical analysts defend themselves in part by denying that socialism ever got a chance in Africa.

"A lot of these regimes weren't really socialist to begin with," said Nelson Moyo, chairman of the economics department of the University of Zimbabwe. "The idea of centralizing everything at once without adequate manpower or training -- that's not necessarily socialism."

Some radical analysts contend that the retreat from socialism is largely a result of pressure from western aid donors and lenders such as the World Bank and the International Monetary Fund.

Others say fruits of African independence have not been lost despite recent setbacks.

"Africa made a major step forward in becoming independent," said Paul Brickhill, a leftist intellectual who manages a socialist bookstore in Harare. "But now the struggle has moved to a further stage."

Paradoxically, some analysts suggest that the country that may have the best chance of achieving genuine socialism is the last holdout against black rule -- South Africa. There, the reasoning goes, exists the largest, best trained and most politically sophisticated black working class and industrial base in Africa, some of the continent's fastest growing trade unions and a readily identifiable class enemy. If ever there is a workers' revolution in Africa, some Marxists contend, South Africa is where it will occur.