MOSCOW (AP) _ A tent city in the Kremlin's backyard which for five months reminded the world of the painful social upheaval wrought by Mikhail S. Gorbachev's reforms was dismantled this weekend.

Rumors had been floating since September that authorities would clear the dozen or so disgruntled Soviets who camped out in plastic and cardboard shacks in front of the giant Rossiya Hotel, about 200 yards from the red brick walls of the seat of Soviet power, the Kremlin.

According to several sources, police finally moved in Saturday night, acting on orders of the Moscow City Council.

Two city police dispatchers, refusing to give their names, told The Associated Press on Sunday some of the squatters were bused to police centers for people not registered at any address. Others who were registered were given tickets home.

One of the police dispatchers offered the only official explanation of the city council decision. ''Those people violated sanitary norms,'' he said.

Neither dispatcher was able to give a number of the squatters, but a reporter saw about a dozen of them at the tent city earlier Saturday.

One witness, Vadim Shilov, said riot police wearing bulletproof vests took away about 50 people, beating some with truncheons. His account could not be independently confirmed.

''The order was to clear it out by New Year's and give the impression that all the issues were resolved,'' Shilov, a 22-year-old resident of the tent city, said in a telephone interview.

The independent newsletter Glasnost reported that a Moscow City Council official told the squatters in advance of a city decree ordering the tent city ''liquidated.'' Bulldozers reportedly moved in overnight to clear the tents.

The unsightly collection of shacks and protest posters was a symbol not only of the social turmoil caused by Gorbachev's reforms, but also of his moves toward democracy that included an unprecedented tolerance of dissent.

Before Gorbachev, the eyesore - located so close to the country's most sacred governmental shrines - would have been torn down immediately and its instigators jailed for years.

Official doctrine maintained that such phenomena could only exist in the West, where exploitation and injustices were rampant.

''The tent city originally was supposed to demonstrate what democracy is like in the Soviet Union. We are a litmus paper of Soviet democracy,'' Zhanna Fedina, a 54-year-old former regular at the tent city, said Sunday in a telephone interview with the AP. She said she did not witness the removal of the squatters.

The protest began July 2, when the demonstrators put up the tents and shacks, made of wood and plastic, hoping to attract official attention and help in their struggles with government. They generally arrived at 8 a.m. and left at 9 p.m.

The initial targets were delegates attending a congress of the Communist Party in the nearby Kremlin in early July. Many of the delegates could not help but notice the protest posters and tents set up to press a variety of causes: homelessness, mistreatment of the mentally ill, unemployment and other human rights abuses.

In September, a woman who spent her days in the tent city claimed the KGB secret police had threatened to set fire to the protest encampment at night when there would be no witnesses. The KGB denied it.

The woman, Valentina Philimonova, was one of about 50 people camped on the grass every day. She lived in a wooden shack covered with slogans saying that Gorbachev has failed to carry out his pledge to serve the people.

As many as 31 tents were erected by disgruntled Soviets hoping someone would listen to their problems and punish those responsible.

Some of the signs that adorned the tents and shacks denounced the Communist Party; others told of losing homes and jobs because the protesters had dared to criticize their bosses.

One sign, framed by a rusting chain and weighted by rocks, read: ''Prisoner of the 20th Century.''

Passersby slowly walked past the tents, some of which were merely poles with clear plastic sheets draped over them. Others are more elaborate: store- bought, olive green canvas tents with stones carefully placed outside to form a makeshift porch.

It was the first thing tourists leaving the Rossiya saw, with the colorful St. Basil's cathedral and the Kremlin forming a backdrop.