Greek MPs have rejected the presidential candidate nominated by Prime Minister Antonis Samaras, triggering a snap general election.
Stavros Dimas failed to reach the necessary 180 votes, which means that parliament will have to be dissolved.
Greece's economy has begun to recover after six years of recession.
But Greeks have endured years of austerity and the left-wing Syriza party leading the polls wants the terms of a huge EU-IMF bailout renegotiated.
The Athens stock market fell 7% as news of the vote sank in, with bank shares among the worst affected. Greek bond yields leapt above 9%, and bond yields also rose in Spain and Italy, two other countries hit hard by the eurozone debt crisis.
Shortly after the vote, Mr Samaras announced that elections would take place on 25 January.
"The country has no time to waste," he said in a televised address.
Mr Dimas, a former European commissioner, secured the votes of only 168 MPs, the same number he had won during the second vote last week.
The government failed to attract the support of two smaller parties, Independent Greeks and Democratic Left, which it needed to win the vote.
The defeat is regarded as a major setback for the prime minister, as well as for eurozone countries that worked hard to bring Greece back from the brink in 2010.
Since then €240bn (£188bn; $290bn) has been spent helping Greece pay off its debts. In return for two major bailouts, the EU and IMF demanded stringent austerity measures.
German Finance Minister Wolfgang Schaeuble, in an interview on Saturday, praised Greece's progress in tackling its debt crisis. But he warned: "Every new government needs to fulfil the contractual agreements of its predecessors."
Although Syriza's lead in the opinion polls has been narrowing in recent weeks, there is concern in the markets and among EU officials that a new Greek government could throw out many of the fiscal reforms implemented by Mr Samaras's coalition with the left-of-centre Pasok party.
Syriza leader Alexis Tsipras praised the vote as a "historic day for Greek democracy" and Independent Greeks leader Panos Kammenos said the era in which Mr Samaras and his coalition partners had "surrendered" Greece's sovereignty was now over.
A party colleague of Mr Samaras, Dora Bakoyiannis, bitterly accused Syriza of forcing the vote at the worst possible moment for the Greek economy.
Mr Samaras's fragile coalition government came to power in 2012 and recently held out hope of leaving the stringent measures of the international bailout.
However, it was instead forced to secure a two-month extension to the bailout in ordered to secure the release of another €7bn in loans. That loan extension expires in February.