The Congress of People's Deputies confirmed President Mikhail Gorbachev's nominee for vice president Thursday on a second ballot after Gorbachev implored the lawmakers to approve someone he trusted.

Earlier, the legislators rejected the nominee, Gennady I. Yanayev, by 31 votes, prompting Gorbachev to request a second vote.The state news agency Tass, citing "provisional results," said Yanayev won the second round. The independent news agency Interfax also reported the victory, saying Yanayev won "about 1,240" votes in the secret ballot.

The confirmation by the 2,239-member Congress means Yanayev, a relatively obscure 53-year-old Communist bureaucrat, will assume the newly created office of vice president in a reorganized federal government hierarchy.

Yanayev was the only candidate for the vice presidency. Neither the new plan - adopted by legislators Wednesday - nor Soviet officials defined the vice president's powers, apparently leaving them for Gorbachev to decide.

A constitutional amendment says the vice president "replaces the president of the USSR in case of his absence and inability to carry out his duties."

The first vote Thursday by the country's highest legislative body was 1,089 for Yanayev and 583 against, the elections commission announced. Yanayev needed at least 1,120 votes, a simple majority of the 2,239 registered deputies.

Gorbachev had said it was important the vice president be someone in whom he had complete confidence and urged further debate on Yanayev's candidacy. "The fact that only 583 deputies or 25 percent of the Congress voted against Comrade Yanayev persuades me to ask the Congress to vote again," he said.

Lawmakers said Yanayev was initially rejected because he was not well known and had too many ties to the Communist Party and its youth organization, the Komsomol.

Radical economist Oleg Bogomolov said during a break in the Congress that Yanayev was "a representative of the party leadership and central committee apparatus. He's very obedient, very conformist."

Yuri Kalmykov, chairman of the jurisprudence committee, said many deputies wanted "someone with experience in industry and economics."

Nevertheless, after the renomination, several lawmakers rose to praise Yanayev and to urge support for Gorbachev.

Nursaltan A. Nazarbayez, president of the Kazakhstan republic, said:

"Comrade deputies, I suggest that we demonstrate not only to the Congress and the whole country at this critical period, but to the whole world, our support for our president."

Marshall Sergei F. Akhromeyev, a presidential adviser and former armed forces chief of staff, urged all deputiesto vote in the second round.

When one lawmaker attempted to criticize Gorbachev, his microphone was promptly switched off by Congress Chairman Anatoly Lukyanov.

Yanayev had been considered a "safe" choice for the vice presidency in these turbulent times of bare grocery store shelves, ethnic violence and nationwide political paralysis.

In comments to the Congress after being nominated Wednesday, Yanayev supported Gorbachev's reformist policies but also took a somewhat hard-line tack, calling for law and order.

Gorbachev had initially planned to nominate Eduard A. Shevardnadze for the job. But Shevardnadze resigned as foreign minister last week to protest what he said was a drift toward dictatorship.

Yanayev, an ethnic Russian, received a law degree in 1967.

He belonged to Komsomol in Gorky and in the early 1970s came to Moscow as chairman of the USSR Committee of Youth Organizations.

In the 1980s Yanayev served for six years as deputy chairman of the Soviet Friendship Society, which maintains non-governmental contacts with foreigners.

Yanayev is the leader in parliament of the 730-member Communist bloc.