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.
Prime minister Antonis Samaras, whose parliamentary majority proved insufficient to elect Dimas, said the snap elections will be held on 26 January.
"Tomorrow I will visit the president and request ... that elections be held as soon as possible, on 25 January," Samaras said in a televised address after the presidential debacle.
Samaras was heading into a government meeting this afternoon, with the entire cabinet expected to tender its resignation.
Opposition leader Alexis Tsipras, whose far-left, anti-austerity Syriza party is tipped to win the snap elections, said this is "a historical day" for Greece.
"Democracy cannot be blackmailed. Today, the government which for 2.5 years pillaged society, is part of the past. With the will of the people, the austerity memoranda will also become part of the past. The future has started. You should be happy and optimistic," he told reporters outside parliament.
An average of three surveys by polling companies Alco, Kappa Research and Interview says Syriza has backing of 27.5 percent of voters against 24.8 percent for Samaras' New Democracy. Syriza seems to be losing ground, as it was four points head a month ago.
But even if Tsipras wins, he will need to find allies to form a governing coalition. If, as it happened in 2012, each party fails to form a government, new elections are held, again.
The timing is particularly bad as the Greek government in December failed to reach an agreement with international creditors on the terms of an exit from the bailout program that has been in place since 2010 for a total of €230 billion.
Athens got two extra months to deal with the presidential elections and adopt the extra reforms needed for the so-called troika of lenders to sign off on the last bailout tranche.
But with early elections coming up and Tsipras seeking to erase some of Greece's foreign debt, the prospect of a "clean" exit as Samaras had hoped for have all but vanished.
The Greek stock market tumbled today, with ripple effects on other European markets - particularly the Italian and Spanish ones - while the Greek borrowing costs spiked above 9.5 percent, for the first time since September 2013.
Italian prime minister Matteo Renzi, however, said he excludes any contagion effect from Greece on his country.
The EU commission, after publicly endorsing Dimas (a former EU commissioner), said today early elections were a "democratic process" and that "the Greek people will once again decide on their future."
"A strong commitment to Europe and broad support among the Greek voters and political leaders for the necessary growth-friendly reform process will be essential for Greece to thrive again within the euro area," economic affairs commissioner Pierre Moscovici wrote in an emailed statement.
Finnish prime minister Alexander Stubb tweeted that "the political new year will begin with elections in Greece. Necessary for the new government to continue reforms. Greece is not out of the woods yet."
In a note to investors issued earlier this month, the US investment bank Goldman Sachs warned that "in the event of a severe Greek government clash with international lenders," local banks may be cut off from the European Central Bank's life line and a enter a Cyprus-style "prolonged bank holiday".
"And market fears for potential euro-exit risks could rise at that point," Goldman Sachs writes.
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.