Marion Barry and his entourage, who have been toasted and praised, dined and honored at every stop along their two-week journey through five countries, departed Africa today so laden with gifts that some had to be left behind for later shipment.

Barry has said that it is enough to have the "spiritual" satisfaction of a return to his ancestral homeland, but it is clear that from the Africans' point of view Barry's very presence here has generated an expectation of something more than good will.

In his wake are not only the implicit promises of his support but the explicit pledges he has made, from seeking donations for a rural clinic in Senegal to becoming a one-man lobby for increased U.S. aid to African countries.

It appears that the mayor left Washington two weeks ago with vague ideas for some "economic and cultural" ties with the countries on his itinerary, but returned with a very tangible shopping list from these relatively poor and underdeveloped countries.

Among the questions that Barry's visit leaves unanswered are what he can do to respond to the needs he has seen, how much he will do - and to what benefit for his constituents in the District.

All the countries he has visited have high illiteracy rates from above 50 percent, life expectancies in the early 50s, extreme rates of infant mortality and inadequate production and industry to be self-sufficient. Their per capita incomes range from the lowest of $170 in Tanzania to no more than Zambia's $420. Some of the national budgets are less than the $2 billion annually spent by the District.

The African mayors seemed to spare no amount of time or money to open their cities for Barry. The heads of state, from Kenneth Kaunda of Zambia to Julius Nyerere in Tanzania, reacted to him with cordiality.

The Nyerere visit today was the last scheduled stop on Barry's trip that began 16 days ago in Dakar, Senegal. This president was the most explicit on just what is expected of black Americans in general and black officials in particular toward Africa.

Barry asked Nyerere what he thought of U.S. investment in South Africa and got a monologue of more than 40 minutes.

"Just stop, and as a matter of principle find out if they [investors] are really interested in the welfare of blacks or in their dividends," Nyerere exploded.

He said it's "nosense" when American companies say they continue with investment in South Africa in order to help the blacks. "It's very nice to say they are helping, but when you are fighting you burn bridges. You don't say your allies are going to suffer when you're fighting."

Barry wanted to know if that applied to existing investments or only new commitments.

"I would say just pull out," the fiery Nyerere answered unequivocally. The chances of the United States adopting that line depends on "liberals, Democrats and blacks," he said. He said black Americans should not let their race interfere with their recognition in the other two categories.

Seated in a hide-covered, high-backed chair on a veranda of his simple villa overlooking the Indian Ocean on the periphery of the capital, exex pressive Nyerere slapped Barry's knee, grasped his wrists or pounded a table at his side to emphasize points in his conversations.

Barry, who has sometimes seemed reserved and awed in the presence of the national leaders, but relaxed, and expansive with other mayors, regarded him closely but silently during most of the talks.

At one point Barry did interject that "black Americans are beginning to understand the struggle [in southern Africa] more and more" but that "we have our problems too. We still have discrimination." Nyerere insisted however, that "it is very different where you have one-man one-vote and you're fighting prejudices, but in Southern Africa, you're fighting the law. It's a philosophy of government."

Boarding a flight that will take him to Athens and then Rome and on to Washington on Tuesday, the mayor said he will be back in his office Wednesday preparing a report on the trip for the city and will hold a press conference on Thursday.

"I'll invite a lot of people for questions and dialogue." He said his office also will set up a task force to respond to the various requests from African mayors. Barry left Dar es Salaam with a lengthy list of needs ranging from simple machinery such as road graders to civil and mechanical engineers.

"They don't expect me to be able to meet all their needs," he said at the airport. "I can't neglect the District."

Barry also said he intends to meet with other spokesmen for Americans' role in southern Africa such as Africare director C. Payne Lucas and Randall Robinson of Transafrica, and to set up "a nationally coordinated umbrella movement" on African conflicts.

The mayor, who clearly has a new appreciation of poverty, having remarked repeatedly on the vast disparity he has seen between resources in American and in Africa, said he feels "much stronger as mayor. I've learned a lot here. It's going to help me do my job better, I'm confident."