President Konstantin Chernenko appeared on Soviet television today for the first time in almost two months to cast his vote in local elections.

The film on an evening news program showed a visibly weak Chernenko seated near a ballot box in a small room. Chernenko was shown later standing, receiving flowers and giving a message to election day workers, surrounded by officials including Politburo member and Moscow party chief Viktor Grishin.

A commentator said Chernenko was voting in the Krasnopresinski district in Moscow where he lives, although the room on television did not resemble the polling station where he normally votes.

Chernenko, dressed in a blue suit, spoke only a few words and appeared to have trouble walking. His gaze appeared tired and unfocused.

The scene on television was reminiscent of the late Soviet leader Leonid Brezhnev's last years, when he would make brief public appearances designed to dampen speculation that he was gravely ill.

Chernenko's reappearance today came as something of a surprise since on Friday his constituents in another Moscow district were told that he could not deliver a traditional election campaign speech "on doctor's recommendation."

Friday's announcement had been the first official confirmation to the Soviet public that the leader was ill.

By appearing on television today, even briefly, Chernenko was able to quash some rumors, circulating in the diplomatic community here, that he was permanently incapacitated.

Chernenko, 73, who suffers from a lung ailment, possibly emphysema, was last seen in public on Dec. 27, although he was reported to have attended a meeting of the Politburo on Feb. 7.

His attendance at that meeting and his appearance today suggested to some diplomats that his health is variable, that he has good days and bad days.

On Christmas Eve, Chernenko was missing from the lineup on top of the Lenin mausoleum during the funeral of defense minister Dmitri Ustinov. The day was bitterly cold, and it was widely assumed that Chernenko had been advised to stay indoors.

He reappeared on television three days later to give awards to Soviet writers and then disappeared from view for 59 days.

Until Friday's announcement, there had been conflicting reports from Soviet officials about the state of his health. One had him on winter vacation near Moscow; another said he had been ill.

When he did not meet with visiting Greek Prime Minister Andreas Papandreou, Greek officials said they were told the meeting did not take place because of Chernenko's poor health, but Soviet officials withheld direct comment.

An election day appearance is a traditional one for Soviet leaders, and earlier today, as western correspondents gathered at Chernenko's local polling station on a side street in central Moscow, it became apparent that the president would not appear before the foreign press.

Instead, attention was focused on Mikhail Gorbachev, second in rank behind Chernenko in the Communist Party hierarchy and possible successor to Chernenko.

Gorbachev, who lives in the same district as Chernenko and other members of the leadership, cast his ballot under the cameras of both foreign and Soviet television.

Gorbachev, at 53 the Politburo's youngest member, performed his role with ease, even informality. When a photographer asked him for another picture at the ballot box, he quipped, "More than one vote is not allowed."

He was accompanied by his wife, Raisa, daughter Irina and granddaughter Oksana -- or Sanochka, as her grandmother called her, answering a question put to her in English.

Today's elections, held across the Soviet Union, were for delegates to republics' parliaments and city and district councils. As in all Soviet elections, turnout today was expected to be close to 99 percent, with only one candidate for each post.

Chernenko and other members of the leadership were elected delegates to various republics' Supreme Soviets, or parliaments. Chernenko was elected to the Supreme Soviet of the Russian Federation, the largest of the country's 15 republics.