A leader of Serbia's nationalist Radical Party has been elected to the powerful post of parliamentary speaker.
Mr Nikolic becomes the third most powerful leader in Serbia
Tomislav Nikolic was elected with support from outgoing Prime Minister Vojislav Kostunica's conservatives.
The vote deepens a crisis caused by January elections, when the Radicals became the largest party in parliament.
Coalition talks aimed at creating a new government have so far failed, and fresh elections will be called unless a deal is reached by 14 May.
The BBC's Nick Hawton in Belgrade says the big question now is whether the Radical Party can go one more step and form part of the next government, which could have serious implications for Serbia's relations with the outside world.
Kosovo and Mladic
Some Serbian newspapers interpreted the deal as a sign that new elections were now inevitable, with some analysts predicting a bigger vote for the Radical Party.
Coalition negotiations between Mr Kostunica's party and President Boris Tadic's pro-European Democratic Party collapsed at the weekend, over Mr Kostunica's determination to retain control of the interior ministry and the intelligence services.
Both are politically crucial departments as Serbia deals with tough problems such as the status of Kosovo, and co-operation with the UN war crimes tribunal in The Hague.
The failure of Mr Kostunica's government to arrest war crimes suspect Gen Ratko Mladic and hand him to the UN war crimes tribunal prompted the European Union to suspend talks on an association pact with Serbia last year.
It is expected that Kosovo will become independent in the coming weeks, either through a resolution of the UN Security Council or as a result of a unilateral declaration by the Kosovo parliament.
Correspondents say this could increase support for the Radical Party in any repeat election, which must be held by mid-July.
The parliamentary vote makes Mr Nikolic, the deputy leader of the Radical Party, the third most powerful figure in Serbia after the president and the prime minister.
He won 142 votes from the 244 deputies present during a marathon 15-hour debate, while a rival candidate from the Democratic Party won 99 votes.
"The future belongs to us, and you are history," Radical Party deputy Aleksander Vucic said, apparently addressing the Democratic Party.
A pro-Western deputy said in turn that Serbia had taken a step back "to the dark days of Milosevic's reign".
It was only the second sitting of parliament since January's election.
Mr Nikolic said his party's collaboration with Mr Kostunica's party applied to the parliament only, and that no deals had been cut on other issues, such as the formation of a government.
The Radical Party's leader, Vojislav Seselj, is awaiting a fresh start of his trial on war crimes charges in The Hague.