MOSCOW, MAY 28 -- They set up a control post today at the entrance to Food Store No. 4, just opposite the Kiev railroad station. Anyone with a Moscow registration stamp in his identification document was allowed in the door. Everybody else was turned away.

"It's shameful, absurd," spluttered Vladimir Polischuk, a Ukrainian private farmer visiting the Soviet capital for the weekend. "The Ukraine feeds the whole of Russia. I sell milk to the state, but I can't even buy my own produce when I come to Moscow."

His friend, Vladimir Semyonov, a Ukrainian factory worker, took a ruble note out of his pocket and examined it carefully. "Look, it says here that the ruble is a negotiable currency all over the Soviet Union. It's a lie. It's a worthless piece of paper. My wallet is full of money, but I can't spend it."

The scene outside Food Store No. 4 was repeated in hundreds of stores all around the capital as tough new consumer restrictions came into force to curb a wave of panic buying. Shelves were virtually cleared over the past three days as shoppers bought everything they could lay their hands on after the government announced that major price increases would go into effect July 1.

Fierce arguments broke out between residents and nonresidents over the fairness of the new regulations. By Western standards, the Soviet capital is poorly supplied. In the Soviet Union, however, Moscow is still regarded as a consumer showcase, attracting shoppers from surrounding regions.

"We hope that the lines will start to become a little shorter now," said Galina Pokidova, the director of Food Store No. 4, as she broadcast announcements that shoppers were limited to buying 10 ounces of butter, a pound of coffee, four pounds of meat and two pounds of macaroni. "At least Muscovites will be able to come and shop here peacefully."

A middle-aged matron from the Soviet Central Asian republic of Kazakhstan, Nela Shalsko, waited outside the director's office to ask for permission to buy some sausage, explaining that she was in Moscow on a business trip. "We send meat and milk to Moscow from Kazakhstan. Why can't we buy it?" she asked, dabbing her eyes with a handkerchief.

"Don't advertise yourself so much," snapped Pokidova. "Of course you send meat to Moscow. We get products from all over the country. What gives you the right to say that you produce more than anyone else?"

The arguments in the stores were just one symptom of a city in crisis as President Mikhail Gorbachev prepares to fly to Canada Tuesday and then to the United States for a meeting with President Bush. Tension is also mounting here over the attempt by Gorbachev and the Communist Party apparatus to block the election of populist politician Boris Yeltsin as president of the Russian federation, the most populous and largest by far of the Soviet Union's 15 consituent republics.

Hundreds of demonstrators carrying banners with slogans such as "If you love Russia, vote for Yeltsin" and "Russia for Yeltsin" lobbied members of the Russian legislature as they left the Kremlin. "If they don't elect Yeltsin, there will be civil war," predicted Vladimir Puktarev, a retired army major with a chestful of medals.

"We supported Gorbachev during the first two years, when he introduced openness," said Vladimir Gostrikhin. "But now he seems to be representing the interest of the party apparatus. What gives him the right to speak in the name of the people? Who elected him?"

Gorbachev went on television Sunday night to defend the government's proposals for a transition to a "regulated market economy" and to appeal to the public not to panic. But his 48-minute speech, in which he seemed uncharacteristically hesitant and ill at ease, does not appear to have succeeded in persuading many doubters.

"Of course, all these plans for a market economy will not produce any results. The poor will become even poorer, and the rich will get richer. That's all that's going to happen," predicted an elderly woman as she scurried away from a store with a shopping bag crammed full of milk products.

"The intellectuals understand the need for a real market, but the ordinary people don't," said Vladimir Skversov, a mathematician, insisting that he still believed in Gorbachev. "We're going to have a very difficult time for five years. Then, perhaps, if we are lucky, things will get a little better."

Despite all the talk about the need for a market economy, the Soviet Union in practice has been moving in the opposite direction over the last few months.

Many Soviet cities, particularly in the Baltic region, already have restricted the sale of consumer goods to nonresidents. To protect their workers from shortages, many factories have introduced a system of special orders for the most desirable food products and consumer items.

"This market system, it's a noose around our necks," said Vladimir Chovokhodov, a World War II veteran, strolling through the Gum department store on Red Square. "What we need now is more discipline and hard work, like we had when Stalin was alive. Everything was cheaper under Stalin. Now there was someone who knew how to run an economy."

"Look at these idlers standing in line for shampoo," the old man went on. "Only speculators stand in line for shampoo. Normal people make do with soap."

One of the women in the shampoo line, Varya Vasilyevna, turned round and started arguing with Chovokhodov. "Of course you don't need shampoo, you old Stalinist. You're completely bald."