DAR ES SALAAM, TANZANIA -- When this East African nation's founding leader, Julius Nyerere, quit the ruling party leadership last month and proclaimed his 25-year rule a "tremendous success," the party faithful cheered him.

But by most nonpartisan accounts, as Nyerere concludes his gradual, five-year withdrawal from power, he leaves a legacy that is decidedly mixed and a nation in precipitous economic decline.

Along with Kwame Nkrumah of Ghana, Kenya's Jomo Kenyatta and Kenneth Kaunda of Zambia, Nyerere was a towering figure in the dawn of African independence. A gentle yet charismatic intellectual, this man known as "the Teacher" translated the works of Shakespeare into Swahili, rallied his people to believe in his grand socialist experiment and supported the independence of other African nations so strongly that he offered sanctuary in Tanzania for South African, Zimbabwean, Angolan and numerous other liberation groups.

"We call him Moses because he gave us the tablets of ujamaa" -- the Swahili word for "working together" -- said C. George Kahama, a longtime government official and close ally of Nyerere. "With hindsight, I think those ideals have served us well. There are no riots in the streets of Tanzania. We have stability. We have basic national principles."

"Because of Nyerere," added an American official based here, "Tanzania has a more independent attitude toward the rest of the world. During the Cold War, he was a leader in the world's Nonaligned Movement and remains so to this day. Even though there are 120 tribes here, I also think Tanzania has a larger sense of national identity than most countries in Africa."

Indeed, Nyerere's supporters point with pride to the fact that Tanzania has suffered none of the breakdowns in law and order that have riven nations across the continent. They also are proud of Tanzania's military tradition and Nyerere's 1978 decision to send troops to neighboring Uganda to help oust Idi Amin and restore order there.

Chiefly because of Nyerere's belief in indigenous African values, Tanzania is the only country on the continent with a native African national and official language -- Swahili. It also boasts 100 percent primary school enrollment and a rise in literacy to 85 percent this year from 30 percent in 1967, according to official government figures.

But to Nyerere's legions of detractors, these gains have been more than offset by the bitter legacies of one-party political stagnation and economic misery he has left his nation.

"This country is paying a very high price for his mistakes," said C. Stanley Kamana, executive editor of the Family Mirror, a new periodical that has emerged as a strong critic of the government. "Nyerere always liked to see himself as the grand thinker. He surrounded himself with people who also were inclined to see him that way. The problem with Tanzania is that for 20 years no one ever stood up and said, 'Look, this is stupid and wrong.' "

"As time went on, the edge of repression became sharper and sharper in Tanzania," said James Mapalala, a former member of the ruling Party of the Revolution, who was jailed as a political prisoner for three years after demanding the formation of more political parties. "There remains no sincerity from public officials. There is no accountability. There is still widespread theft of public money and no way for anyone to protest freely. . . . The economy has been killed at the expense of politics."

As Kamana put it: "The problem with Tanzania is that it has always tried to practice socialism with people who secretly believed in capitalism."

The result at nearly every level of Tanzanian society was devastating. Many of the peasants, who form 90 percent of Tanzania's 25 million people and whose corn, cassava and other crops provide more than 80 percent of Tanzania's export earnings, were forcibly removed from their most productive land. Some fertile areas went unused, and many valuable tree crops were ravaged by diseases.

Embittered by poor government prices for their goods, farmers, ranchers and miners ignored the state and smuggled many millions of dollars' worth of produce, leather and minerals out of the country. Production of cashews, a valuable cash crop, fell more than 90 percent. Official corruption was so rampant, said Western analysts, that more than $130 million in credits given to rural cooperatives -- which were run by party officials -- disappeared over a recent five-year period.

Corruption has been virtually institutionalized here, with a new Swahili term that means "buying air" often used to describe public funds that are never spent in the manner intended.

Between 1973 and 1986, per capita income in Tanzania, one of the world's poorest countries, fell 8 percent. Shortages of basic consumer goods were so severe that some citizens of Dar es Salaam "were walking around half-naked because there simply weren't any clothes," said a Western analyst.

The country remains dotted with failed state-owned shoe, leather and textile factories and other white-elephant examples of misspent government funds. Many bookstores and the national library remain stocked with such oddities as the complete works of North Korean leader Kim Il Sung and copies of Soviet Life magazine.

In a famed 1967 declaration in the Tanzanian city of Arusha, Nyerere vowed to end illiteracy, poverty and disease by steering his nation along a path of socialism and national self-reliance. He believed that a strong tradition of communal sharing and neighborly caring that was central to his romantic view of life in the Tanzanian countryside somehow could be institutionalized under the leadership of a dedicated political party. He "wanted to build a fair society that the West had failed at," said Kahama. "He wanted to do away with greed and class tensions."

To many liberal Westerners and Africans alike, the dream of true independence and self-reliance embodied in the Arusha Declaration seemed lofty and indeed noble in an age when the interests of the competing superpowers dominated events in the Third World.

Yet by 1989, after decades of political corruption and economic mismanagement, Tanzania was receiving about $400 million in export earnings while relying on more than $800 million in foreign assistance. "I think this country is more aid-dependent now than it has ever been," said Ian C. Porter, resident representative of the World Bank here.

One indication of how badly the country's infrastructure has collapsed is that the World Bank and other donors have embarked on a $900 million road-repair project here that when completed will return about 5,000 miles of roads to usable shape -- the same figure as in 1970.

Since 1986, the man who succeeded Nyerere as president, Ali Hassan Mwinyi, has begun to undo some of the economic mess. Spurred to carry out economic reforms mandated by the International Monetary Fund, the World Bank and other donors, Mwinyi has loosened controls on private enterprise, raised farm prices and cut back on the civil-service rolls. Stores are once again offering consumer goods, and the country has enjoyed four straight years of modest economic growth.

But the hardest part of national reform -- opening the political system to new ideas and parties, a step urged by donors -- is yet to come.

Last month, Nyerere -- who said he intends to remain an active party member in retirement at his farm near Lake Victoria -- poured cold water on a vigorous national debate about whether to go to a multi-party system, warning of a national catastrophe if more than one political party were allowed to compete for power here. To roars of approval from longtime party stalwarts, he likened multi-party democracy to a man marrying for a second time when he didn't know if his second wife would be any better than his first.

Whether Tanzania will ever dissolve its first marriage and go for a second remains to be seen. In any case, Nyerere has managed to achieve one thing that neither Kenyatta, Kaunda nor any other longtime African ruler ever came close to doing.

At 64, the Teacher said he was tired and would quit of his own volition.