MOSCOW, JULY 11 -- The Soviet Communist Party congress fended off an unprecedented challenge to the authority of President Mikhail Gorbachev today by electing his nominee, Ukrainian leader Vladimir Ivashko, to the newly created post of deputy party chief.

The official Soviet news agency Tass reported that Ivashko, 58, had defeated Politburo hard-liner Yegor Ligachev in voting by the nearly 4,700 delegates to the 28th Communist Party Congress. As deputy general secretary of the party, Ivashko will be responsible for the day-to-day running of the 19-million-member organization, allowing Gorbachev to concentrate on affairs of state. Detailed results of the balloting will be made public Thursday.

Ivashko's election came at the end of a day of high political drama and sharp polemics between moderates and conservatives at the congress, and it suggests that Gorbachev, who was confirmed Tuesday as party leader, is succeeding in imposing his will on the delegates despite sharp criticism of his foreign and domestic policies.

The decision by Ligachev to run against Gorbachev's candidate for a top party post was highly unusual. Senior party leaders traditionally have been expected to give public support to decisions of the general secretary, particularly on sensitive personnel matters, whatever their personal views.

In nominating Ivashko, Gorbachev said the party's number-two position should be occupied by a non-Russian to reflect the proposed reorganization of the Soviet Union into a confederation of sovereign states. He used a similar argument earlier this week to justify the expansion of the Communist Party's ruling Politburo to include party leaders from each of the Soviet Union's 15 constituent republics.

"It is important that these two people {the general secretary and his deputy} be close," said Gorbachev, indicating that he would find it very difficult to work with Ligachev, his most prominent conservative critic, who had held the unofficial number-two slot in the party before being demoted in September 1988.

In his address to the congress today, Ivashko depicted himself as a firm supporter of Gorbachev's perestroika reform campaign, saying that it should have been launched 20 years earlier. But he also insisted that the Communist Party is the only political force capable of modernizing the Soviet Union.

Ivashko, a politician whose views are considered moderate to conservative on most issues, last year succeeded Vladimir Shcherbitsky, a hard-liner, as leader of the Communist Party in the Ukraine, the Soviet Union's second-largest republic and a region in which powerful nationalist sentiment could prove troublesome to the Kremlin.

Ivashko was elected Ukrainian president by that republic's legislature two months ago, but he resigned from the post this morning, ostensibly because he had lost the confidence of the Ukrainian lawmakers.

Under pressure from the increasingly influential nationalist opposition, the Ukrainian legislature voted last week to recall 63 Ukrainian delegates, including Ivashko, from the Communist Party congress, saying that their presence was needed in Kiev, the Ukrainian capital. Ivashko refused the summons to return, which was supported by both Communist and non-Communist Ukrainian legislators.

Despite his defeat today, Ligachev has succeeded in demonstrating that he has significant support in the party, particularly among officials and senior military officers.

A few months ago, his political career seemed to be virtually over, but he made a surprising comeback by casting himself as the defender of traditional Communist values and questioning the headlong retreat of Socialism in Eastern Europe.

Answering questions today from congress delegates, Ligachev, 69, reiterated his opposition to a limited experiment with private property advocated by Gorbachev. He also sought to gain the support of the party bureaucrats who make up a majority of delegates at the congress by saying that he was for "continuity in cadre policy" -- a code phrase for allowing the apparatchiks to keep their jobs.

"The question today is clear," he said. "Either the U.S.S.R. ceases to exist as a Socialist, multi-national country, or it retains its worthy place among powers that are at the forefront of human civilization.".

Radical-reformist delegates rushed to the microphones to object to Ligachev's nomination on the grounds that it would provoke mass resignations by rank-and-file party members.

At one point, they even succeeded in having his name removed from the ballot under an obscure clause in the party rule book that allows delegates to blackball candidates they do not like. But the decision was reversed moments later.

A third candidate, Anatoly Dudyrev, 45, told the congress he decided to run for the deputy's post because he felt both Ivashko and Ligachev were too old for it.