Five men stood around an oil drum fire and rubbed their hands together against the chill. A work crew come to scavenge bricks, they stood in rubble; on a praire landscape that looked like some frontier ghost town where the mother lode had run out.

As recently as 10 years ago, the same 1 1/2-square-mile neighborhood off Market Street, part of this venerable city's northside black ghetto, housed 23,095 inhabitants. Today, its population has drained away to something under 6,000 souls, according to 1980 census figures.

This scene in old St. Louis is mirrored to varying degrees in other industrial centers. In city after city, primarily in the Northeast and Midwest, the ghettos have emptied out since the last census was taken in 1970. "Black flight" has followed "white flight" and currently outstrips it in percentage terms.

"One way to look at this is that all those Great Society programs worked. The poverty program, model cities, affirmative action -- they were 'take-off aids' that did for blacks what the Gi Bill did for whites after World War II," said Frank Avesing, an urban analyst with St. Louis University's Center for Urban programs. "It got them out of the slums."

The dark side of this phenomenon, which Avesing calls "class skimming," is that the inner cities are left with a core of the elderly, the young unemployed, and ot er intensely poor people. They are an increasingly isolated concentration of those most dependent on government aid and least able to contribute to city's tax base.

St. Louis has lost the highest proportion of its residents of all the nation's 30 largest cities. Once the fourth-largest city in the United States, this historic "gateway to the West" has lost at least 28 percent of its population in the last decade. From a peak of about 880,000 in the early 1950s, the city population has declined to just under 450,000, according to preliminary census estimates.

Now ranked 25th its population today is roughly the same as in 1890.

Prairie grasses, much like those that greeted the French fur trader who first opened a trading post here in 1764, have reclaimed thousands of acres in the very heart of the city.

The heaviest population exodus was from the center -- the doughnut hole, as urban specialists sometimes refere to such depleted areas. The black inner city neighborhoods lost consistently higher proportions of residents -- from 28 percent to 60 percent -- than white neighborhoods.

A number of other cities are not far behind. Cleveland is the runner-up, with a loss of around 24 percent, leaving a population comparable to that of 1910.

"Our literature used to be full of phrases like 'the teeming slums.' Well, the slums ain't teeming anymore," said Norman Krumholz, director of Cleveland State University's Center for Neighborhood Development and for 10 years the city's planning director.

"After the substantial abandonment [of houses] and demolition, there is almost a rural atmosphere in some of the remaining neighborhood," Krumholz said. "The density [people per square mile] is in some cases below that in the suburbs."

The pattern is widespread. The District of Columbia lost 16 percent of its population; Baltimroe lost 13.5 percent. Among the other losers were: oDetroit, 21.3 percent; Boston, 12.3 percent; Pittsburgh, 18.5 percent; Philadelphia, 13.8 percent, and Kansas City, 12 percent.

In St. Louis, Beartrice Hatton, a feisty black veteran resident of the city's north side, remembers warmly the neighborly city life of her youth, when she lived over her daddy's barbershop. "It used to be a beautiful place. Now it's all discarded. Where are all the aggressive young people?"

"People just got a little older and little meaner than what they was," she said of the long years of decline she has witnessed.

As she talked, the brick harvesters moved in on the crumbling, burnt-out shell of a Victorian slum dwelling nearby, which was about the only thing within acres that stood higher than the buffalo grass. It was about to join the other 60,000 dwelling units the city has lost in the last 20 years -- about a quarter of all its housing. The bricks would be sold for patios out in the swelling suburbs.

The city currently owns more than 5,000 weed-covered owns more than varying sizes whose structures have been demolished, 98 percent of them in the poor inner city areas.

The most notorious of these urban "pastures" in the 40-acre wasteland that was the site of Pruitt-Igoe, the infamous public housing project of 33 high-rise slabs that norished violent crime. The government built it in the mid-1950s for $21.5 million and blew it to smithereens in the mid-'70s as a colossal failure. Now there is nothing here but fire hydrants, spaced with geometric precision among the prairie grasses, and in one corner a barbecue pit. Skyscrapers, church spires and the landmark 630-foot arch encircle it like distant mountains.

The city's boosters point to several downtown commercial development projects, under way or at least on the drawing board, as hopeful signs. And there is some "gentrification," a return to old neighborhoods by young middle-class working people interested in restoring old homes. But so far it is happening more in the white neighborthoods of the south side than in the older north side.

In other cities, such as the District of Columbia, Boston and Chicago, this process is more prounced and has created extremes of very rich and very poor on the same turf, according to Sue Marshall of the Urban Institute in Washington.

So-called gentrification may not be a major factor in overall population shifts in any case, according to Larry H. Long of the U.S. Census Bureau. "The evidence is that the black city-to-suburb movement is clearly predominantly middle class. And for the same reason as whites 30 years ago. . . . The low-income population moves around quite a bit to get away form the rent collector. Neighborhoods go up or down. But the substantial pattern is of a reshuffling of this population within the city."

The city watchers read the future of St. Louis in signs like these:

Nearly 25 percent of the population is at least 60 years old.

More than 300 manufacturing firms have shut down or left since 1970, for a loss of about 58,000 jobs.

Half the city's births are to unwed mothers.

St. Louis is expected to lose two state senators and seven state representatives and an unknown amount in federal money from some 200 programs, on the basis of the new figures. Like several other cities, including Detroit and New York, St. Louis has sued the government to revise the figures on the grounds that the census failed to count everybody, but specialists say even a recount wouldn't change the stark basic trend.

"When the working people leave and take their purchasing power with them, and just a dependent population is left behind, a lot of the services most of us take for granted move out, too," explained Georgia Rusan, chief of family services for the Human Development Corp., a city antipoverty organization.

"Of course the supermarkets leave, the bakeries, the shoe repair shops.

The bus lines are transferred out. . . . So the complaint, for instance, that the food stamp people buy a lot of groceries, well, they are forced to do all their shopping once a month. They are also forced to pay a cab fare to get the grocies home. They often have no other way."

Even the comfort of their religion often eludes the poor trapped in a dying inner city, she said. The old churches that remain have outmoded heating equipment and high ceilings, which mean high utility bills.

"They can barely keep their doors open for Sunday services," she said.