Mikhail Gorbachev appeared to have won strong endorsement for his efforts to preserve the Soviet Union, but referendum results Monday showed him losing on an issue that could strengthen his chief rival.

Soviets voted Sunday on whether to back Gorbachev's efforts to keep the deeply divided country together under his leadership.In the Russian republic, citizens also voted on whether to boost the Russian presidency. Preliminary returns from Moscow, Leningrad and other parts of the Russian Federation showed overwhelming support for the second measure.

If confirmed, the result would be a victory for Gorbachev's political rival, Boris Yeltsin, who leads Russia, the largest of the 15 Soviet republics.

Gorbachev, speaking to reporters after he cast his ballot Sunday, described the plan to enhance the Russian presidency as "very dangerous."

"We cannot talk about the preservation of the union . . . if we accept this proposal," Gorbachev said. He also said, however, he would "respect the opinion of the Russians" on the issue.

Although Yeltsin often is described as the Russian president, he is actually chairman of the Russian Federation parliament. But he would be a favorite in any popular election for the presidency.

Hanging in the balance in the first nationwide referendum in Soviet or even Russian history was not only the fate of the vast country and its more than 100 ethnic groups, but also Gorbachev's future.

Early returns indicated strong support for preserving the union in 90 percent of the country, although the governments of six small republics refused to back the measure and boycotted Sunday's vote.

But the question also appeared to have been defeated in Leningrad and the Ukrainian capital of Kiev, where sentiment was strong for reform and reducing the power of the central government.

The vote totals for Kiev and Leningrad confirmed the results of earlier elections and public opinion surveys that showed greater support for radical reforms in big cities than in the countryside.

"It's quite natural for Leningrad to vote this way," said Leningrad lawmaker Sergei Berezensky.

"At least here, people have more information and have maybe more freedom to express their real views than somewhere in the village district," he added.

The day after the referendum, it remained unclear what political capital Gorbachev might try to make of his apparent victory in the national voting.

The Soviet president had lobbied heavily for approval and predicted victory in the referendum, which asks citizens whether they want to stay together in a renewed federation.

With all 15 republics having endorsed some sort of independence, Gorbachev wanted to appeal directly to the people to restore a national unity shattered by sometimes violent ethnic, legal and political disputes.

Sunday's election was marred by scattered violence and charges of irregularities. In some districts of the Ukraine and Russia, officials lured voters to the polls by selling such scarce goods as beer, fruit and sweets.

Officials said Monday that 71.4 percent of 1.8 million voters in the Ukrainian capital cast ballots. According to preliminary results, 52.8 percent in Kiev voted against preserving the Soviet Union and 44.6 voted in favor. Remaining ballots were invalid, said city council spokesman Valentin Danilyuk.

Voters interviewed as they left polling stations on Sunday expressed discontent over shortages of such items as sugar, flour, butter, sausages and vodka.

"It's a disgrace that even tobacco is hard to find these days," said Valya Slusar, a 30-year-old nurse, who stood in line for cigarettes after voting at Polling Station No. 5. in Kiev's Darnitzky Region.

Slusar said she would have voted even without the inducement of a shopping spree. "Not everyone has the same sense of civic duty," she said.

Many also said they had stopped trusting Soviet leaders after authorities failed to notify residents in Kiev for several days following the 1986 accident at the nearby Chernobyl nuclear power station.

"They deceived us when Chernobyl took place. Children walked in a parade along the (main street of Kiev) soaking up radiation because no one warned us," said Tamila Semintuk, a 52-year-old elementary school teacher.