Almost every black African city suffers from decaying, overcrowded slums and a critical shortage of housing for low-paid wage earners. But in Lusaka, the Zambian capital, the people themselves are solving the low-cost housing problem with such creativity that they have won the assistance of their government and international agencies.

"Slowly by slowly I'm building my family a five-room house," said Charles Maswelili, 31, a mechanic's helper who has spent the past 13 years living in a variety of one-room shacks in Lasaka's John Howard squatter area.

"Food is dear these days and I don't earn so much money," Maswelili added, "but I have a loan and have already built two rooms out of concrete bricks."

While working-class African slumdwellers from Nairobi to Lagos feel hopelessly trapped in overcrowded shantytowns of filth and poverty, Lusaka's squatters are optimistic about their future.

With no other accommodation available, rural Zambians who flocked to Lusaka in the 1960s for jobs and a better life drifted into the now-sprawling squatter compounds that encircle the city, they built their own houses - many of them just one-room shanties made from scrap wood and metal scrounged from junked cars.

At first, these unauthorized settlements were threatened by the government, which hoped to house the people in low-income projects. But by the early 1970s, with almost half of Lusaka's 400,000 residents living precariously insecure existences in squatter compounds - the government realized that even the most ambitious building program could never accommodate them all.

Ending their denunciations of the squatters, who were unfairly blamed for Lusaka's soaring crime rate, the Zambian press and government finally noted that the squatters had not only built their own houses and landscaped their plots, but had also formed cooperative markets, credit unions, rudimentary schools and created some of the country's most democratic and responsive branches of the United National Independence Party (UNIP), Zambia's only political party.

In the compounds, locally elected party leaders acted like traditional chiefs and, in the absence of any civil authorities, they solved disputes and enforced standards of buildings and behavior.

The years of official neglect however, had left the squatter compounds - hitherto considered merely temporary shelter - overcrowded and without any sanitation or clean drinking water. The incidence of disease, especially in children, was very high.

"We realized that it was much cheaper to give the people loans to improve the shanties they had already constructed themselves than to build new houses for them," said Richard Martin, deputy director of Lusaka's Housing Project Unit. "Titles to their plots and increased basic services such as piped water was the only other inducement the squatters needed to upgrade their homes and neighborhoods and feel a real stake in the future," Martin added.

"Values are changing so fast in Lusaka that even the squatters consider the suburban way of life ideal," Martin said. "People spend their weekends puttering around, fixing up their houses and planting trees. Where the squatters were previously embarrassed to admit that they lived in places like Chawama and John Howard, now a new sense of community pride has emerged."

With a $20 million loan from the World Bank, the squatter compounds are also profiting from new roads, clinics and schools, all planned and some even built by the residents themselves.

Alice Munji, the wife of a soldier and mother of two said: "With piped water my kids don't get diarrhea like they used to. Life is improving here in Chawaman. We don't want to go back home."

"It wouldn't work if we tried to impose the project on them," Martin said. "Instead we explain what we have to offer and encourage the residents to plan their neighborhoods through their UNIP branches. The party has done pretty well here as a de facto government for years, so we let the branch chairman organize . . . just like they always have."

Alex Chanda, a community development worker assigned to the squatter compounds, explained how the community spirit has been stinulated. "We have brought in local musicians, held slide shows and even established a street theater group to build popular enthusiasm," he said.

UNICEF is helping to train 50 community development workers, like Chanda, who will assist squatters in Lusaka and other Zambian towns to upgrade their neighborhoods. UNICEF is also supporting children's clinies in the compounds and nursery schools held in community centers built by the parents themselves.

Chaftan Chulu, a retired watchman with two wives who earns about $2.50 a day selling kerosene, said, "I'm going to add three more rooms. Before, I was afraid to spend a lot of money to build a good house because we were always blameld and told to move. But now I have a title to my plot and a loan so I want my house to be as solid as possible."

"I didn't believe them at first," said Chulu, who lives in the compound called John Howard, "but after they put in piped water and built the new roads where we decided, and then opened the materials store so I could take cement against the loan . . . well, I saw it was true."

"I am already old," Chulu said. "I could retire at home in my village if I wanted, but this is a good place. Life is good here so I will stay."