MOSCOW, MARCH 15 (THURSDAY) -- Running without opposition, Mikhail Gorbachev was elected the Soviet Union's first executive president, it was announced today.

The Congress of People's Deputies, which voted earlier Wednesday to elect a president to a five-year term and then turn presidential elections over to the Soviet public in 1995, voted on Gorbachev's nomination at the close of the session. The ballots were counted overnight.

Gorbachev won by a vote of 1,329 to 495, Yuri Osipyan, chairman of the parliamentary counting commission, told today's session of the congress. "I accordingly declare that Gorbachev has been elected president," he said.

The only way Gorbachev could have lost was if a majority of the deputies had abstained or crossed out his name, but there was almost no chance of that. The new office of president is intended to become the center of Soviet executive power as Gorbachev continues to shift authority away from the Communist Party.

Both Prime Minister Nikolai Ryzhkov and Interior Minister Vadim Bakatin withdrew their names from nomination before the balloting Wednesday. Some deputies were stunned that the leader of Soviet "democratization" would be elected in a way so reminiscent of a bygone age. But even most of the radical deputies who seek faster change echoed the notion that "only Mikhail Sergeyevich" could lead the country through the next stage of reforms.

Just before the vote, an Armenian deputy, Genrikh Igityan, stormed to the podium and said, "What has happened here? We did not find a single alternative. . . . There were only three candidates and we knew all along that two would withdraw."

Although many of the speeches nominating Gorbachev were endlessly flattering in the old style, some were scathing, criticizing Gorbachev for failing to feed the nation, resolve ethnic crises, draft a new constitution and face a nationwide election campaign.

"There has been a lot of praise heaped on Gorbachev here. But the truth is that we are on the edge of an abyss," said Leonid Sukhov, a driver from the Ukrainian city of Kharkov. "Even if Mikhail Sergeyevich should be elected czar, the situation will not change."

Olzhas Suleimenov, a deputy from Kazakhstan, said the Soviet leader was inconsistent in instituting reforms, saying, "Gorbachev is putting his foot on the brake and the accelerator at the same time." Teimuraz Avalani, from Siberia, accused Gorbachev of leading the country to the brink of economic collapse and Nikolai Kutsenko of the Ukraine even proposed that Gorbachev withdraw his nomination.

With political organizations and parties starting all over the country, Gorbachev's unopposed election to a position intended to become the center of political power in a more democratic Soviet Union seemed out of step to many deputies.

"Gorbachev is fine, but I'd rather not vote at all," said Ivan Zhdakayev, a deputy from Sakhalin Island in the Soviet Far East. "Elections mean a popular vote, not this charade."

Moscow deputy Sergei Stankevich said he thought Gorbachev would be a successful president but added that he would abstain in the balloting because he felt the Soviet leader should have faced a nationwide vote. "I'm afraid our tradition of no alternatives was at work here today," he said.

Asked why the Inter-Regional Group of radical deputies did not nominate its own candidate, Stankevich said the faction had been more concerned with limiting presidential powers than with "getting involved in a symbolic, losing presidential race." The group did eliminate a provision in the draft law that would have given the president two opportunities, instead of one, to veto legislation.

Alexander Yakovlev, a leading legal scholar at the Institute of State and Law, said that while the presidency was now strong and the legislature "developing," the judicial branch was still extremely weak. He said, however, that by the end of this year the legislature would introduce measures to give the Soviet Supreme Court "American-style" powers of constitutional review.

Many legislators and officials here believe that once Gorbachev has secured the presidency and is confident that the office is the real center of Soviet power, he will give up his post as general secretary of the Communist Party. One member of the party's Central Committee said Gorbachev told the leadership he knew there would be some "apprehension" about his holding both posts but did not indicate whether he would give up his party position.

There was never much question Gorbachev would win a presidential election held in the congress.

The day's first critical vote was on the issue of whether the president would be chosen by the deputies or by universal suffrage. A public opinion poll broadcast on Soviet television this week revealed that 84 percent of the Soviet public wanted immediate, direct elections for president.

Most of the conservatives in the hall have an innate distrust of popular elections and could be counted on to support election in the congress. It was the liberals who needed convincing. So Gorbachev, who has been able to manipulate this young legislature at times with almost uncanny ease, made sure that the voices supporting an immediate election in the congress were influential progressives with reputations for integrity.

"I well remember the February Revolution {of 1917} and I know where emotions can lead," said Dmitri Likhachev, an 84-year-old historian from Leningrad. "Our country now is swept by emotion. And a direct election for the presidency would lead to civil war. Please believe me."

Alexander Yakovlev, the most progressive member of the ruling Politburo, and Leningrad lawyer Anatoli Sobchak also spoke in favor of election in the legislature. Their message was plain, and made many deputies anxious: that a popular election campaign would be divisive, and that in republics such as Azerbaijan the vote could become a dangerous vehicle for popular discontent.

"A popular vote sounds attractive -- it is indeed a great idea -- but we must take account of the current crisis," Yakovlev said. "There is a struggle now going on between those who support reforms and those who are against it. We are at a critical stage."

In the end, the vote was close. Gorbachev barely achieved the necessary two-thirds majority of the 2,245 deputies, with 1,542 voting for, 368 against and 76 abstaining.

Some deputies suggested that Gorbachev wanted election by the congress because he feared the uncertainty of a popular election. Ukrainian deputy Yuri Shcherbak said, "A year or two ago, I would have said that Gorbachev would easily win in any popular election. But now he can't be so sure." Gorbachev's popularity rating in recent national opinion polls has been at 40 to 45 percent.

During a break in the session, the Communist Party leadership gathered in the hall and nominated Gorbachev as its candidate. Later many organizations, from trade unions to the veterans' association, seconded the nomination.

The nominations of Bakatin and Ryzhkov, by the conservative Soyuz faction, were not taken seriously since both men are considered too close to Gorbachev to oppose him in public.

In his speech refusing nomination, Ryzhkov said, "Today there is only one candidate to fill this post -- Mikhail Sergeyevich Gorbachev." When a few deputies continued to support Bakatin long after he had withdrawn his nomination, the interior minister said, "Look, no one in the world has ever been forced to be president."