MOSCOW, JULY 14 -- Viktor Grishin, the once powerful boss of this city and, briefly, reputed rival to Mikhail Gorbachev for the nation's top job, resigned today from his last official post as a parliamentary deputy.

The terse announcement by the Soviet news agency Tass signaled the final eclipse of one of the staunchest members of the Kremlin old guard who sat in the ruling Politburo from 1971 to February 1986. Tass said Grishin retired from the Supreme Soviet, or Parliament, "at his own request."

In the last two years many of the Soviet Union's former old-line leaders, including Grishin, 72, have virtually sunk into oblivion, losing both power and position as Gorbachev and his team campaign against the "stagnation" of the Leonid Brezhnev era.

However, not all members of the old guard have been shifted out of their positions. For instance, Vladimir Shcherbitsky, head of the Communist Party of the Ukraine and one of the last of Brezhnev's allies, has remained in place even as a shake-up in his power base continues. Nine top officials in the Ukraine were removed last week, according to Sunday's edition of Pravda Ukrainy, including Premier Alexander P. Lyashko.

One stongly symbolic act signaling the decline of Brezhnev's generation is a petition by some residents of the city of Brezhnev -- renamed after the leader's death in 1982 -- to restore their city to its original name, Naberezhniye Chelny.

Grishin had been a deputy since 1967, but was ousted from his main position of power, as Moscow party chief, in December 1985, amid reports of scandal in the city housing industry.

This spring, Soviet dramatist Mikhail Shatrov hinted in an article in the magazine Ogonyk that Grishin had been Gorbachev's main rival when the Politburo met in March 1985 to choose the successor to Konstantin Chernenko.

Gorbachev has replaced scores of ministers and about one-third of the 300-odd members of the party's Central Committee since he took office.

At a party leadership meeting last week, Dinmuhamed Kunaev, another member of the old guard and close Brezhnev ally, was expelled from the Central Committee, an acute humiliation for the onetime Politburo member and party boss of Kazakhstan. Kunaev's ouster from his post in Kazakhstan last December sparked riots in the capital city of Alma Ata.