The nationalist speaker of Serbia's parliament has stepped down after just five days in the job.
Mr Nikolic's resignation ends a four-month political stalemate
Tomislav Nikolic's removal was a condition of a deal reached on Friday between the country's two main parties, who hope to form a coalition.
Serbia's parliament can now vote on the new coalition cabinet, which should receive formal approval on Tuesday.
The coalition partners must form government by 15 May, nearly four months after parliamentary elections.
Western governments had expressed serious concern at Mr Nikolic's election to Serbia's third most powerful position and feared the country may be abandoning its road to reform.
In an emotional resignation speech in parliament, Mr Nikolic warned the new government that if it "peacefully accepts" independence for Kosovo, his nationalist Radical Party would not "sit calmly and wait".
"I resign from the post... but be sure that I will watch closely what your new government will do," he said.
Mr Nikolic has previously called for military intervention in Kosovo if it splits from Serbia.
Earlier, opposition MP Nenad Canak said Mr Nikolic's nationalist and anti-European stand no longer had a place - especially as Serbia had just won the Eurovision song contest.
Mr Canak said Serbia's neighbours had all awarded his country maximum points in the contest. But Russia, described by Mr Nikolic as Serbia's only friend, had only awarded his country five points.
Serbia's two main pro-reform parties agreed to form a government late last week, keeping out Mr Nikolic's nationalist Radicals, the largest party in parliament.
The coalition was agreed more than three months after the general election, and four days before a deadline for new polls expired.
Democratic Party of Serbia (DSS)
New Serbia party
Serbian President Boris Tadic said caretaker Prime Minister Vojislav Kostunica would stay on in the post.
The ministries of defence and interior will reportedly be divided between the two parties.
The Radicals became the largest party in parliament in the January elections, but no party won enough seats to govern alone.
The BBC's Nick Hawton in Belgrade says Serbia now faces an even greater challenge.
The UN Security Council is currently discussing a plan to give Kosovo its independence, something demanded by its majority Albanian population.
Serbia strongly opposes the plan and has vowed never to accept it.