Three men push a rusty, white Mazda pickup truck, of uncertain vintage and apparently out of gas, into the Mobil station on Julius Nyerere Avenue here.

They wait patiently in line until it is their turn to present their state ration card and collect the seven gallons of gasoline they are allowed to buy each month. But instead of driving off after filling up, the men push the car out of the station and back to a nearby house.

Like so much else that goes on in the Mozambican capital these days, the explanation for that odd scene has to do with the black market: Gasoline is such a rare and valued commodity here that anyone with a ration card continues drawing his monthly allotment even after his car has given out. The gasoline that the Mobil station sells for the state-controlled price of 27 Mozambican meticals a liter -- about $2.60 a gallon at the official exchange rate -- can be sold for 15 to 20 times as much on the black market.

In the collapsed economy of war-torn Mozambique, scenes like the one outside the Mobil station are increasingly common. Maputo has become Africa's version of Berlin after World War II -- a city of economic desperation where life for many has been reduced to a daily struggle to put food on the table. Where once scientific socialism and Marxism's "new man" were worshiped, the new god in Maputo is the black market and its gospel is the theology of hard currency -- dollars, pounds or South African rand.

Everyone, it seems, plays the game. Middle-ranking government bureaucrats, who once prided themselves on their socialist rectitude, now gently insist on changing money with foreign visitors. Others with no foreign contacts spend a large part of each day away from their desks searching out deals or waiting in food lines.

Soldiers sell their uniforms, boots, rations, even their weapons. Crippled war veterans peddle black market cigarettes outside the central hospital for the equivalent of $15 per pack. Children wait outside the city's hard currency shop to park foreigners' cars and carry their groceries in the hopes their customers will bestow upon them a small coin from the United States or South Africa.

The energetic idealism that once went into making and sustaining socialist revolution has drained away, replaced by the survival imperative. "Capitalism has not, as we had once feared, infiltrated our society," says a rueful Mozambican intellectual. "Instead, it has seized us by the throat."

The ruling Politburo, keeper of Mozambique's radical flame, has bemoaned the change, conceding in a communique in March, "We have drifted away in recent years from our revolutionary tradition." It blamed racketeering by "parasitic sectors."

President Samora Machel recently called for "a drastic offensive to purify our ranks," language that recalled for some the 1983 public execution of seven alleged black marketeers for "economic crimes."

On May Day, in a brief, impromptu speech, Machel said that there were 200,000 unemployed people in Maputo, forming a pool from which criminals and black marketeers were easily recruited. He repeated his government's longstanding policy that only those with jobs could live in the city. The rest, he warned, would be forcibly relocated to rural areas.

The speech revived memories of Operation Production, the ill-fated attempt in 1983 to move 50,000 of the city's unemployed to work camps in Mozambique's remote northern provinces. That action soon deteriorated into an exercise in petty vengeance. Party officials compiled blacklists of "antisocial elements," neighbors denounced each other, and single mothers were branded as prostitutes until the government called it off. Few residents here seem eager for a rerun.

The government's increasingly desperate attempts to combat the black market have more than a touch of irony, say some analysts, because it was government policies that helped create it.

Strict price controls on food and an emphasis on collectivism led many peasant farmers to stop producing for the marketplace. The same thing happened to most private industries. Five years of economic warfare waged by armed rebels have only exacerbated the problem. Meanwhile, government presses work overtime printing currency to pay burgeoning official debts.

All of which has meant that too much worthless money chases too few goods in a rigidly controlled marketplace -- ideal conditions for a black market. The dollar that buys about 40 meticals at the official rate now brings in at least 1,500 on the black market.

For the average Maputo resident, the market is a shadowy presence in an otherwise tightly restricted existence.

Fernando is a young office worker for an international relief agency here. To live and work in Maputo, he must carry at all times a residential permit, a work card and an identification card, all issued by the government. To feed his family of four, he must take those cards to his neighborhood party office and get a certifying letter that he can take to the Ministry of Internal Trade in order to receive a food ration card.

With the ration card, Fernando is entitled each month to shop at his neighborhood grocery. There he can purchase at a state-fixed price various staples in amounts dictated by the size of his family.

The available fare this month is slim. Each family member is entitled to five pounds of Australian rice -- part of the massive flow of western food aid that helps keep Mozambique from starvation -- two pounds of sugar and a pound of dried fish. Fernando's family is also allowed a quart of cooking oil and four batteries. Other staples -- milk, cornmeal, eggs, noodles, soap -- are simply not available.

Beef is a luxury suitable these days only for the western aid workers and diplomats who constitute Maputo's new aristocracy. Fernando remembers well his last piece of beef -- a steak he enjoyed in 1983 at a local hotel while escorting some foreign journalists attending an international conference. "I was assigned to take them to lunch," he recalls with a smile, "and I availed myself of the opportunity."

Fernando is luckier than most. As an employe of an international organization, he receives about $100 a month for use at the hard currency shop, called the Loja Franca, which he uses mostly to buy chicken, milk and eggs for his family. Prices at the Loja, which receives much of its products from South Africa and Portugal, are so reasonable that Mozambicans with access to hard currency often can be seen buying up large quantities of fruit, potatoes and onions to resell on the black market.

The system's very rigidity leaves it vulnerable to corruption. By controlling access to ration cards, neighborhood party officials wield a virtual life-or-death power over residents, and some levy a standard bribe for their services. After Machel's threat to relaunch Operation Production, residents say the price has begun to rise as those without proper papers scramble to buy protection.

Because Fernando's job gives him special access to food and a decent wage, it is more than just a career step; it is crucial to his family's survival, and he lives in constant fear that someone might take it away from him.

As miserable as city life may appear to outsiders, many find it vastly preferable to the countryside, where war and deprivation have made refugees out of hundreds of thousands of peasants. Ten years ago, perhaps 300,000 people lived in Maputo. Now the population tops 1 million, according to Mayor Alberto Massavanhane, who says 100,000 people are pouring in annually.

Many have no place to live. The mayor said there are more than 25,000 requests for rental housing on file, while last year only 755 requests were met. There are 60,000 children unable to attend school because there are not enough classrooms.

As part of its new opening to the West, Machel's analysts, because it was government policies that helped create it.

Strict price controls on food and an emphasis on collectivism led many peasant farmers to stop producing for the marketplace. The same thing happened to most private industries. Five years of economic warfare waged by armed rebels have only exacerbated the problem. Meanwhile, government presses work overtime printing currency to pay burgeoning official debts.

All of which has meant that too much worthless money chases too few goods in a rigidly controlled marketplace -- ideal conditions for a black market. The dollar that buys about 40 meticals at the official rate now brings in at least 1,500 on the black market.

For the average Maputo resident, the market is a shadowy presence in an otherwise tightly restricted existence.

Fernando is a young office worker for an international relief agency here. To live and work in Maputo, he must carry at all times a residential permit, a work card and an identification card, all issued by the government. To feed his family of four, he must take those cards to his neighborhood party office and get a certifying letter that he can take to the Ministry of Internal Trade in order to receive a food ration card.

With the ration card, Fernando is entitled each month to shop at his neighborhood grocery. There he can purchase at a state-fixed price various staples in amounts dictated by the size of his family.

The available fare this month is slim. Each family member is entitled to five pounds of Australian rice -- part of the massive flow of western food aid that helps keep Mozambique from starvation -- two pounds of sugar and a pound of dried fish. Fernando's family is also allowed a quart of cooking oil and four batteries. Other staples -- milk, cornmeal, eggs, noodles, soap -- are simply not available.

Beef is a luxury suitable these days only for the western aid workers and diplomats who constitute Maputo's new aristocracy. Fernando remembers well his last piece of beef -- a steak he enjoyed in 1983 at a local hotel while escorting some foreign journalists attending an international conference. "I was assigned to take them to lunch," he recalls with a smile, "and I availed myself of the opportunity."

Fernando is luckier than most. As an employe of an international organization, he receives about $100 a month for use at the hard currency shop, called the Loja Franca, which he uses mostly to buy chicken, milk and eggs for his family. Prices at the Loja, which receives much of its products from South Africa and Portugal, are so reasonable that Mozambicans with access to hard currency often can be seen buying up large quantities of fruit, potatoes and onions to resell on the black market.

The system's very rigidity leaves it vulnerable to corruption. By controlling access to ration cards, neighborhood party officials wield a virtual life-or-death power over residents, and some levy a standard bribe for their services. After Machel's threat to relaunch Operation Production, residents say the price has begun to rise as those without proper papers scramble to buy protection.

Because Fernando's job gives him special access to food and a decent wage, it is more than just a career step; it is crucial to his family's survival, and he lives in constant fear that someone might take it away from him.

As miserable as city life may appear to outsiders, many find it vastly preferable to the countryside, where war and deprivation have made refugees out of hundreds of thousands of peasants. Ten years ago, perhaps 300,000 people lived in Maputo. Now the population tops 1 million, according to Mayor Alberto Massavanhane, who says 100,000 people are pouring in annually.

Many have no place to live. The mayor said there are more than 25,000 requests for rental housing on file, while last year only 755 requests were met. There are 60,000 children unable to attend school because there are not enough classrooms.

As part of its new opening to the West, Machel's government last May lifted controls on the price of fruits and vegetables sold in Maputo's markets. Suddenly the vacant shelves of the city's central market were filled with grapefruit, bananas, apples and other wonders, some of which had not been seen there for several years. But prices were sky high and never seemed to come down.

Tomatoes and onions remain at the equivalent of $12.50 a pound. Shriveled green peppers go for $6.25. Bananas are a bargain at $4. All remain unattainable for workers whose salaries average less than $250 a month.

The free market mechanism did not seem to work. Fruit sat on the shelves until it rotted, but traders refused to lower their prices. A report to the People's Assembly, Mozambique's parliament, contended that tons of unsold produce were thrown away each week and that stall holders were clearing $500 in profit each day.

Western diplomats, who had lobbied hard for the change, blame "excess liquidity" for the high prices -- meaning that Mozambicans have millions of meticals stuffed in their closets and mattresses that are available for anything worth buying. They contend that prices will eventually come down when more goods and food reach the shelves.

Meanwhile, shop windows are beginning to display new goods, but most shoppers can only afford to look. At a children's clothing store near Fernando's home, a soiled T-shirt sells for $20.

As if poverty were not enough, lately Maputo has faced war as well. The antigovernment Mozambique National Resistance movement has launched an "urban phase" that included a recent car bomb that injured 60 and land mines on nearby beaches.

Perhaps the cruelest bombs have been those placed in transistor radios and cassette players and left on city sidewalks, where they are simply too great a temptation for many residents. A father of two was killed two months ago when, after eying it for days, he brought a booby-trapped radio into his apartment and turned it on.

Foreign aid workers, who are prime guerrilla targets, seem more afraid than locals at the prospect of urban warfare. But many believe their most important shrine, the Loja Franca, will remain unscathed. Their reasoning is that, like so many outsiders in Maputo, the rebels themselves depend on the Loja for their daily bread.