BELGRADE, Serbia - Serbia's pro-democracy parties have reached a power-sharing deal to form a new government, the hard-line parliament speaker said yesterday, an agreement that averts the possibility of his radical ultranationalists regaining power.

Western governments and Serbia's neighbors were alarmed this week by the election of an admirer of Serbia's late nationalist president, Slobodan Milosevic, as the parliament speaker - the No. 2 post in the country.

Earlier yesterday, U.S. Undersecretary of State Nicholas Burns warned that if Tomislav Nikolic's Radical Party came to power in Serbia, it would "seriously harm" the country's relations with the West.

The Radicals are staunchly anti-Western and used to back Milosevic's warmongering policies in the Balkans. Their leader, Vojislav Seselj, is awaiting trial before the U.N. war-crimes tribunal in the Hague, Netherlands.

The Radicals also oppose the Western-backed U.N. plan for the Serbian province of Kosovo, which envisages internationally supervised self-rule.

Nikolic said yesterday that a power-sharing deal had been reached between pro-Western President Boris Tadic and caretaker Prime Minister Vojislav Kostunica, whose talks on a new cabinet had been deadlocked for nearly four months.

Belgrade's independent B-92 radio said the agreement was reached during an overnight meeting between the two leaders, and it included an initiative to replace Nikolic as parliament speaker.

Nikolic said he would resign rather than be replaced. He predicted that the deal would not last long and that the nationalists would triumph in the next election.

"The only thing keeping them together is pressure and blackmail [from abroad]," Nikolic said. "They do not share the same ideology. . . . We will have another crisis soon."

Burns, attending a Balkan summit in Zagreb, Croatia, welcomed the news from Belgrade, saying Washington supported "any democratic government that doesn't include the Radicals."

"I think it's very clear that if the Radicals come back to power, that would seriously harm relations of Serbia with the United States and with all of the European countries," he said.

The European Union enlargement commissioner, Olli Rehn, said that once the pro-democratic government was in place, the EU would "immediately" restart its pre-membership talks with Serbia.

"I trust the leaders of Serbia's democratic forces now realize their responsibility and choose a European future for Serbia, instead of letting the country fall back to its nationalist past," he said.