Thousands of people rallied in Moscow to vent anger at the Communist Party elite's alleged campaign to discredit ousted city party boss Boris N. Yeltsin, a maverick reformer who is running for national office.

In a rare display of political passion, about 3,000 people marched on city hall Sunday to drum up support for the popular candidate. Police made no move to break up the unauthorized gathering.Yeltsin is seeking a seat in the new national parliament, the Congress of People's Deputies, in elections next Sunday that will represent the country's first experiment with contested elections.

"He's against the party mafia, and that's why the party mafia is against him," declared marcher Taras Osipov, a 65-year-old retired engineer. "Yeltsin is with the people, and for the people."

Yeltsin, 58, is running to represent the Soviet capital, where he headed the local party apparatus for almost two years before President Mikhail S. Gorbachev fired him for criticizing the slow pace of reform.

Yeltsin has charged that the party machine is conspiring to derail his candidacy. Yeltsin's opponent in the election is Yevgeny Brakov, director of the Zil automobile factory.

As the Soviet Union lurches toward Sunday's vote, it is clear that Gorbachev's reforms have brought amazing latitude in public debate to a country that only recently severely punished unorthodox ideas.

Pravda reported on Sunday that even Gorbachev and other members of the party's ruling Politburo failed to win unanimous support in their bids for seats on the new legislature.

The Communist Party newspaper said that of 641 Central Committee members and alternates who voted Thursday, 12 opposed Gorbachev's candidacy.