RYAZAN, U.S.S.R. -- A decade ago, Valery Ryumin was a young political officer with the Soviet army in Afghanistan, waging war against the mujaheddin guerrillas. Today, as mayor of a provincial capital in the heartland of Russia, he is waging war against Communist Party apparatchiks.

"We have taken over power in the city, but the Communist Party does what it likes in the countryside. It is able to use the countryside against the town," said Ryumin, briefing a visitor on the first six months of what promises to be a bitter and protracted campaign pitting him and other reform-minded radicals against the party.

Elected mayor of Ryazan during local elections last April, Ryumin has attracted nationwide attention because of his feud with an entrenched party bureaucracy that is loath to give up power. Ryazan -- a city of 540,000 so quintessentially provincial that it seems a Soviet version of Peoria, Ill. -- has become a test case for the struggle of radical against conservative, town against country, a free market against the old command system.

The battle is taking place against a backdrop of economic disintegration, a devastated environment and the collapse of ideological certainties. Ryazan is only three hours' drive from Moscow, but the provincial city's empty shops and potholed streets make the capital seem affluent by comparison. Virtually everything worth buying in Ryazan is rationed. At one store, the only products freely available were milk, Turkish tea, carrot relish, a fizzy fruit drink and Ryazan candlesticks.

Like many other democratic insurgents swept into town halls around the Soviet Union, Ryumin has discovered that political power is of limited value unless accompanied by economic power. In the absence of a market system, economic power remains in the hands of the bureaucrats who allocate scarce resources.

"The peasant is obliged to give all his produce to a central state fund, which then distributes it to us as it sees fit. The peasant does not know to whom his food is going, and we don't know from where our food is coming. By controlling the mechanisms of distribution, the Communists have discovered a way to hang onto power," he complained.

The key to the party's continuing power in places like Ryazan is the collective farm system, which Ryumin describes as a form of feudalism. Collective farm chairmen are tied to the party by a tight web of political and economic patronage. They depend on the authorities for virtually everything -- machinery, fertilizers, seed, transportation, markets. In return, they are required to display unquestioning political loyalty.

In Ryazan, as in many other Russian provincial cities, the radicals won a majority of seats on the city council. But the Communists were able to use their grip on the countryside to win control of the regional, or oblast, council. And it is the oblast council that supervises the distribution of economic resources.

The chairman of the Ryazan oblast council is Leonid Khitrun, the region's Communist Party chief and a former government minister for agricultural technology. After the elections, Khitrun and Ryumin held a two-hour meeting to see if they could cooperate. Their differences were so complete that they have never met since.

"It's useless talking to him; he'll never change," said Ryumin, who at 40 is 20 years younger than his rival. Khitrun, who declined to be interviewed for this article, is reported to have described his opponent as "a rotten watermelon with a dark past" at a party meeting in Ryazan.

Hostilities opened with the mayor being refused permission to address the people of Ryazan over the regional television station. Ryumin responded by preventing Khitrun and other party bureaucrats from moving into luxurious new offices that had been paid for partly with city funds. The mayor said he wanted to give priority to the 50,000 residents of Ryazan waiting for decent apartments.

The next major battle came over the harvest. The Ryazan region, like every other area in Russia, has witnessed a dramatic flight from the land over the past few decades. Living conditions on the state-run collective farms are even more primitive than in the city. To make up for the chronic rural manpower shortage, the Communist Party chief ordered the emergency mobilization of public transportation workers from Ryazan.

For a few days, it seemed as if the city's public transport system would grind to a halt. There were incidents of bus drivers being flagged down by traffic policemen and told to report to military draft boards. The crisis eased after the city council ordered the mobilization of some 600 chauffeurs of official cars, including those belonging to the Communist Party.

Ryumin's 10-year journey of political self-discovery began in 1980 when he was appointed assistant commissar of a paratroop division in Afghanistan. At the time, the Kremlin was insisting that Soviet troops were not involved in combat operations in Afghanistan. Soviet newspapers carried pictures of smiling Soviet soldiers helping Afghans build homes and dig irrigation canals. The invasion was depicted as a gesture of assistance to another socialist regime.

"In Afghanistan, I discovered for myself that what appeared in our newspapers was the complete opposite of the truth," said Ryumin, who returned home in 1982 after being seriously injured. "We really were fighting. Thousands of people were killed and injured on both sides. The contrast between what I saw and what I read made me completely distrust our government. It was very difficult for me to tell our soldiers what we were doing there, whom we were fighting, what was right and what was wrong. Nothing made sense."

Like many radically minded military men, Ryumin spent much of his career as a political officer, teaching courses in Marxism-Leninism.

"In order to understand the full absurdity of Lenin, you have to study him first," Ryumin said. "We political workers really studied Lenin. We were able to understand the system that he created and see how he changed his ideas to suit his purposes.

"When you read Lenin, you can understand everything that has happened in this country."

According to Ryumin, it was Lenin -- not Stalin -- who first devised the system of centralized distribution to impose his political ideas. "Under war communism, the state controlled all grain supplies. Rationing was introduced in the big cities. Workers had a simple choice: Obey or die from hunger."

Ryumin said the pattern repeated itself 26 years ago, and he expressed fears that it may be doing so again.

In 1964, shortly before the reform-minded Soviet leader Nikita Khrushchev was overthrown, there was a sudden spate of food shortages all over the Soviet Union. It is now widely believed that the shortages were created by party bureaucrats seeking to manipulate public opinion against Khrushchev. A few days after the Kremlin coup, goods again appeared in the shops. Ryumin said Ryazan's current shortages may be traceable to party manipulations.

Communist officials in Ryazan vehemently denied Ryumin's charge that they are cutting back food deliveries to the town out of political spite. In an interview, ideology secretary Valery Komogorkin also played down the squabble between the mayor and the party chief. "Of course there are differences of view; that's natural. But the tension here is connected with the overall economic situation in the country," he said.

Though the accuracy of Ryumin's claims is difficult to determine, local Communist officials clearly have resisted any challenge to their political and economic monopoly in the countryside. Despite repeated calls by President Mikhail Gorbachev for the free development of all forms of agriculture, not a single private farm has established itself in the Ryazan oblast.

"The changes that have taken place in the Soviet Union will only become irreversible if land is transferred to the peasants," said Ryumin. "A private peasant would have a natural interest in bringing his produce to the cities -- in order to pay his taxes and buy industrial goods. No party worker would be able to stop him. If we succeed in creating a new class of property owners, the idea of returning to the command-administrative system will be absurd."