With 99-percent of the votes counted, Hungary's former Communists turned Socialists and their liberal coalition partner appear to have won the decisive second round of parliamentary elections. The outcome came as a major setback for the center-right alliance of conservative Prime Minister Viktor Orban.

With nearly all votes counted, the Hungarian Socialist Party and its smaller coalition partner Alliance of Free Democrats were set to win nearly 200 of the 386 seats in parliament. The rest will be taken by outgoing Prime Minister Viktor Orban's Federation of Young Democrats Hungarian Civic Party and its tiny ally, Hungarian Democratic Forum.

The results lead to celebrations at the Socialist Party's Headquarters in Budapest.

Thousands of people shouted his name, as the mild-mannered and slightly camera-shy Socialist Prime Minister-elect Peter Medgyessy entered the platform, accompanied by his wife. Missing were the tri-color Hungarian flags that could be seen during election rallies of his center-right opponents, who were supported by an ultra right wing party.

Fifty-nine-year-old Mr. Medgyessy suggested in his acceptance speech that he would try to re-unite a nation that analysts say has been divided between nationalist and more western oriented forces following one of the most bitter fought election campaigns in Hungary's post-Communist history. The former finance minister and banker has made clear that bringing the country together will be just one of the challenges.

Mr. Medgyessy will also face an uphill battle to end poverty, especially in eastern Hungary, which has lagged behind the relatively richer west. In addition Hungary's ailing healthcare sector and pension system needs reforms as the country prepares to join Western institutions such as the European Union. Mr. Medgyessy has said he wants to make his country a full EU member in 2004.

Elsewhere in Budapest the atmosphere has been more tense as Prime Minister Orban reluctantly accepted defeat. Speaking in front of thousands of supporters, some waving flags, 38-year-old Mr. Orban described the outcome of the elections as a sign that millions of people wanted to feel Hungarian.

He repeated his controversial statement that his party would regard Hungary a nation of 15-million people, a reference to the up to 5- million ethnic Hungarians living outside its current borders.

Mr. Orban welcomed the fact that his center right alliance has, in his words, remained a powerful force in politics. "We have to remember that since the collapse of Communism no Hungarian party received so much support," he said. Mr. Orban added that Hungarians never stood together behind a cause in such huge numbers.

Yet, investors have expressed relief about the election outcome which they say will create a more Western style business environment. And Western officials believe the election results will help to overcome international concern about nationalism in the former Communist nation.