LENINGRAD -- Two years ago, Gennadi Lobanov was a happy, respected engineer with a passion for aviation and a prestigious job building MiG-29 fighter-jet engines.

Then, in late October 1988, Lobanov's bosses came to him with a problem and a proposal. As part of Moscow's economic reforms, they explained, the defense industry had been ordered to begin shifting resources from military to civil products. The Klimov engine plant, where Lobanov had worked for more than 20 years, was now to be responsible for revitalizing a small, floundering factory in central Leningrad.

Gennadi Alexandrovich, the bosses asked, will you run that factory for us? You would be helping both Klimov and your country, they hinted, although the new job will be a bit different from the high-tech weaponry you've been used to.

Today, Lobanov makes machines that make shoes.

"I won't hide the fact that it was psychologically difficult for me to move from an industry that was highly prestigious to this one," said the 50-year-old Lobanov, gesturing toward a machine that can turn out 1,200 pairs of footwear a day. "But I'm going at this as if I'm going to do it for the rest of my life. I'm throwing all my energy into this job."

Lobanov's metamorphosis is a very small part of a very large and ambitious plan to demilitarize one of the world's most militarized societies. As envisioned by President Mikhail Gorbachev, the changes involve radically shrinking and restructuring the armed forces, as well as replacing a bellicose, offensive military strategy with one that is more defensive.

No aspect of this retrenchment is more critical or more difficult than "conversion," the transfusion of Soviet intellectual and economic resources from military to civilian purposes. Conversion -- whether beating swords into plowshares, or turning jet-engine makers into cobblers -- is paramount to the enduring success of perestroika, Gorbachev's policy of restructuring the Stalinist system.

"If conversion works, the rest of reform will work," said Lt. Gen. Ivan Panov, editor of the military newspaper Krasnaya Zvezda. "If conversion doesn't work, the rest of reform will be in trouble."

Unfortunately, conversion is not working. Not now, not soon. Seven decades of Marxist mismanagement have so befouled the economy that many Soviet officials believe it may take years to salvage a solvent, rational, market-based system capable of delivering a substantial peace dividend.

Furthermore, although defense plants began producing consumer goods after World War II, many of Moscow's recent conversion decrees gave military industrialists just a few months' notice to undertake new ventures that are far afield of their traditional expertise. Aviation factories have been ordered to design machines that make pear jelly and fur wraps. The Rybinsk engine plant is supposed to build pasta production lines, while another defense complex was ordered to begin packaging 180 tons of oat flakes a day.

The Votkinsk Machine Works, which once built nuclear missiles, is now supposed to make dishwashers, underwater drilling rigs and milk-pasteurizing equipment. Noting the chronic food shortages plaguing the country, Stephen M. Meyer, a Sovietologist at the Massachusetts Institute of Technology, added: "You have guys who were making high-tech fighters now making waffle irons. Which is crazy, since they don't have the ingredients to make waffles in the Soviet Union anyway."

"Conversion is a good idea -- just like God," said Nikolai Kapranov, a defense expert with the Soviet Academy of Sciences. "But it's not something solid yet. It's more a feeling, that we've given a lot to the defense industry and now it's time for the defense industry to give something back."'A Fairy Tale'

Last summer, Soviet trade officials presented South Korea with an estimate of consumer needs in the Soviet Union: 32 million refrigerators, 21 million sewing machines, 1.5 million vacuum cleaners, 4.8 million television sets, 420 million disposable syringes, 1.2 billion razors.

In theory, asking the defense industry to help sate that demand makes sense. For more than half a century, Soviet leaders channeled the country's best minds and materiel into what is officially known as the military-industrial complex, which responded by providing the nuclear and conventional arsenal of a superpower.

An estimated 4.8 million Soviets work for the complex, an immense umbrella organization that includes eight government ministries supervising 150 major weapon assembly plants, 50 weapon design bureaus, 450 military research and development facilities and thousands of weapon component manufacturers.

Defense workers also make many of the best Soviet consumer products, such as the Riketa vacuums built in a Ukrainian aviation factory, according to Julian Cooper of the University of Birmingham, England. Consumer goods now account for 40 percent of the military-industrial complex's total output, including virtually all Soviet television sets, two-thirds of the washing machines and half the motorcycles and bicycles.

Savvy Soviet shoppers often check the manufacturing plate on a product to see if it was made in a defense plant.

Under conversion plans first announced by Gorbachev in the summer of 1988, Soviet officials hoped to save 250 billion rubles, or $42 billion, by making fewer weapons and increasing production of consumer goods to 60 percent of the defense industry's output by 1995. To bolster food supplies -- and political stability -- much of the initial conversion effort was intended to benefit Soviet agriculture.

Conversion also represented a confluence of interests between Gorbachev's economic and political goals and the military's anxiety about a defense-industrial base that could no longer compete with the West.

For years, Soviet weapons were designed with this maxim in mind: "Make it simple, make it reliable, make it rugged, make it work." But in the early 1970s, simplicity in weapon design lost some of its allure as modern "smart" munitions grew more accurate, lethal and complex.

Through the 1970s and 1980s, Soviet generals grew increasingly worried about the inability of the military-industrial complex to keep up with sophisticated NATO weaponry; the sheer size of Warsaw Pact forces, they feared, only partly compensated for the widening technology gap.

Today, Soviet industry badly lags behind the West in electronics, advanced computers, machine tools and other technologies necessary to build a 21st-century arsenal. More than one-third of the equipment used in some military factories was built before 1940, according to one Soviet aerospace executive.

Many Soviet generals concluded that a pause in the arms race to permit industrial modernization would buy time "to ensure enhanced future production of modern weaponry," said retired Lt. Gen. William E. Odom, former director of the National Security Agency. Similar retrenchments have occurred before in Soviet history, notably in the 1920s and late 1940s.

"The military was willing to give up something now for something later," said Arthur Alexander, an analyst with the Rand Corp., an American think tank.

But whether this marriage of convenience will benefit either Gorbachev or the military is doubtful. The military is hard-pressed to find evidence that it will get "something later," given the current economic free fall. Moreover, most reformists -- and probably most Soviet citizens -- want to see the military-industrial complex defanged, its perquisites abolished, its stranglehold on the Soviet economy broken forever.

Conversion thus far is "a fairy tale, a myth," said Maj. Vladimir Lopatin, a member of the Soviet legislature. Of 1,045 military plants targeted for conversion, only 30 will produce solely civilian goods, Lopatin said; the vast majority will remain under an unwieldy military-industrial bureaucracy that suppresses innovation and distrusts economic reform. Furthermore, few workers are eager to jump to civil production lines, which typically pay less and have fewer job benefits than military plants.

"The biggest problem with our conversion program," said Alexei Izyumov, a leading Soviet expert on industrial reform, "is that there was no plan, there is no plan and the plan that is being prepared is meaningless."Engines or Shoes?

Perhaps more than any place in the Soviet Union, Leningrad is where conversion ultimately will succeed or fail. Founded by Czar Peter the Great in 1703, this elegant city of canals and boulevards has become a military shipbuilding and aviation hub with 600,000 defense employees -- one of every four workers -- and 152 major defense plants.

Military orders have dropped 20 percent this year over last year, unemployment is a rising concern, and the reformist city government sees conversion as an imperative if Leningrad is to redeem the glory of its prosperous past.

Lobanov, the aviation engineer turned footwear boss, is trying to do his part. Lobanov's two-year tenure as chief of the Klimov factory's Special Bureau for the Production of Shoe Machines -- as his plant is formally known -- illustrates the formidable task at hand.

After being asked to run the plant, Lobanov immediately fled for a month-long vacation on the Black Sea "to think about it and to get as far away from Leningrad as I could." Upon returning home, he took a crash course in shoes -- amassing enough treatises on the science of footwear to fill two groaning bookshelves -- and flung himself into the job.

The plant, founded in 1954, occupies a dingy three-story building at No. 22 Izmailovsky Prospect. Three hundred employees design and build machines to make everything from children's booties to army boots. Lobanov found a work force demoralized from years spent at the bottom of the Soviet industrial pecking order, both in prestige -- shabby shoes have long been a symbol of the country's blighted consumer sector -- and in efforts to get raw materials and equipment.

Lobanov raised salaries 20 percent while demanding that his employees "work more diligently, too." He tried, with limited success, to exploit his connections at Klimov and in the Aviation Ministry to finagle supplies and modern machine tools. He also has relied on old-fashioned bartering -- swapping, for example, a sample shoe-making machine for several hundred finished pairs of shoes to give his workers. And he introduced the use of computers to design new machines, particularly those required to cut leather within the narrow tolerances needed for a good fit.

Progress has been elusive. Lobanov proudly displayed two of his new machines at Soviet trade shows, but the old frustrations of erratic suppliers and industrial inertia persist. And the fitful movement toward a market economy in the Soviet Union has created new problems. Lobanov is uncertain, for example, how much to charge customers for his machinery.

"Our pricing system compared to yours is like night compared to day," he sighed. "We take a new model, compare it to an old one, try to calculate the economic benefit of the new machine and try to figure out a price from that." The Soviet pricing system, Prime Minister Nikolai Ryzhkov has observed, is "a kingdom of distorting mirrors."

Lobanov has thrown body and soul into his new job, but when pressed he will concede that there is little sense in having the aviation industry mixed up in the shoe business.

Alexander Sarkisov, 54, the Klimov chief designer who reluctantly asked Lobanov to change careers two years ago, agrees. "Before we have totally messed up the engine building industry," he said, "we must decide in principle what to produce, either engines or shoes. Nothing good will come of this combination."'To Fill That Void'

A few miles from Lobanov's factory, on a crowded, 40-acre tract fronting the Neva River, the Baltiski Shipbuilding Enterprise also is wrestling with conversion.

Shipbuilding is Leningrad's oldest and most venerated industry. The Baltiski has specialized in warships since czarist times, designing the famous cruiser Aurora, which played a leading role in the 1917 Bolshevik Revolution, and subsequently building many of the Soviet navy's most fearsome combat vessels.

Today, however, the Baltiski is finishing its last warship, the nuclear-powered cruiser Yuri Andropov. No further orders are expected from the military-industrial complex, and the shipyard must find other business to keep its 12,000 workers employed.

"We never thought about how we were financed before. Now we have to think about earning money, about how to get profitable orders," said Gennadi Shomonov, 50, the Baltiski's deputy manager, who has been a shipbuilder for 27 years. "Management over-relied on central planning in the past, and now we feel insecure and stressed. We're cutting defense orders drastically, and we've got to find a way to fill that void."

Ten percent of Shomonov's employees -- including many of his best engineers and skilled workers -- have quit to work in newly flourishing private repair yards and industrial cooperatives, where they earn twice the 300-ruble a month average salary paid at Baltiski.

Raw materials, once provided routinely under a system that gave priority to defense industries, are now scarce. "We're commodity famished," Shomonov said. "When the old system was operating, everything was smooth. But not now. It's hard to get supplies. Some suppliers are no longer interested in us because they can make more money from other firms."

The Leningrad city government, flexing new muscle, is demanding that the shipyard pay for electricity, water and the use of municipal land. The city also has threatened to fine industrial polluters. "Ecological problems were often neglected," Shomonov acknowledged. "We're in the center of a city of 5 million, and we've been building and testing nuclear reactors for quite some time."

The Baltiski, like many Soviet enterprises, seeks salvation in foreign partnerships. The Finns have ordered two nuclear icebreakers. Germany just signed a contract for eight chemical-carrying ships and agreed to provide steel and other raw materials, a godsend that will fill 25 percent of the shipyard's capacity. Shomonov hopes to retain his workers by paying part of their wages in German marks, which can be used to buy high-quality goods.

The shipyard also would like to raise capital by issuing stock certificates, although Shomonov acknowledges that he does not begin to understand the mechanics of shareholding.

Another pressing concern is how to encourage the exchange of technical information with other shipbuilders, Soviet and foreign. "We've been living under a totalitarian system, so there's a psychological strain in trying to break the old habits of maintaining secrecy as we once did," Shomonov said.

Like thousands of Soviet managers, Shomonov is both thrilled and alarmed by the brave new world that conversion implies. "This is the beginning of the end of ideological confrontation -- which is welcome -- and it is material evidence of the end of the Cold War," he said. "But we've never had to think about how to behave if we were set free. Now we have to think about it."The Red Army of the Future

To provide industrial conversion with a military counterpart, the Soviet army is struggling to find a doctrine -- the nitty-gritty of how to fight -- that stresses defense rather than the traditional Soviet sledgehammer offense.

"Ten or 12 years ago, attack was the god of tactics. The main type of combat operation was the advance and the offensive," said Col. Vasiliy Chigorev, assistant dean of the Frunze Academy, a war college for senior officers in Moscow. Western intelligence experts believe the Soviet war plan called for a blitzkrieg offensive to capture Europe in a month.

In recent years, however, Gorbachev has called for restructuring the army so that it is "reasonably sufficient" to repel invaders without threatening Western Europe with a huge tank force. Again, a confluence of interests led the military to concur. Gorbachev wanted a smaller, cheaper force; his generals recognized that the army had become so "tank heavy" that it was vulnerable to NATO's flexibility, mobility and agile firepower.

As a result, in a cutback codified by the arms treaty signed in Paris Monday, the Soviets have begun radically redesigning their army. Tank divisions will lose 20 percent of their tanks; motorized infantry divisions will lose 40 percent, typically shrinking from 270 tanks to 160 per division, the fewest since the early 1960s.

But whether the military achieves the expressed goal of "defensive defense" -- a doctrine that precludes offensive actions -- remains to be seen. Few weapons are strictly defensive, and U.S. intelligence analysts contend that the Soviets, while scrapping many tanks, have added significantly to their artillery, armored personnel carriers and other weaponry. "All they've got now with respect to defensive defense," said Rand Corp. expert Ted Warner, "is a slogan."

Yet in some ways, the changes overpowering the Soviet military are even more basic than the reorientation from offense to defense. Prognostication in the Soviet Union may be futile to the point of foolish these days, but certain changes in the armed forces seem probable as this decade unfolds.

The Soviet Union may still retain the world's largest army, but rather than the 5 million-strong force of recent years it probably will number less than half that. Deployed just two years ago as far south as the Khyber Pass, as far west as the Fulda Gap and as far east as the Mongolian steppes, the army will continue to retreat, pulling back not only within the borders of the Soviet Union but perhaps even within the borders of the Slavic republics.

The sheer size of the Soviet Union, even if shorn of several rebellious republics, virtually guarantees that the country's military will remain a key player in world affairs. The widespread vexation that many Soviet officers feel at resurgent German nationalism is likely to grow as the balance of power in Europe tilts even more toward Berlin.

But many officers today find comfort in the observation by the late Soviet leader Nikita Khrushchev that "it would take seven nuclear missiles to destroy Germany." As long as Moscow has those seven missiles, the officers' concern is not likely to become irrational anxiety.

Military reformers have grand ambitions. They would squeeze the current five services to three, probably by merging strategic rocket and air defense forces into the army, navy and air force.

They also would abolish conscription, strip the Communist Party of its privileged position, slash the number of generals and forbid use of the military to solve ethnic disputes. At this point, each of these aspirations seems likely, albeit not as quickly as the reformers would prefer.

But what remains hardest to forecast is the eventual relationship between the Soviet people and their military and whether it will take two years or two decades to resurrect an army that the country esteems and supports.

"Everyone wants to have an army," said Alexandre Rahr, a Soviet specialist for Radio Liberty. "But no one -- or virtually no one -- wants to have this army."

Staff researcher Lucy Shackelford contributed to this article.

ESTIMATED PERCENTAGE OF CONSUMER GOODS

MANUFACTURED BY THE SOVIET MILITARY EACH YEAR

Virtually 100% of the country's 20 million televisions, radios and cameras.

95% of the country's 6 million refrigerators.

70% of the country's 5 million vacuum cleaners.

60% of the country's 6 million washing machines.

50% of the country's 7 million motorcycles and bicycles.

SOURCES: Production figures from Plan Econ; military estimates from Communist Party Central Committee