Greek Prime Minister Giorgios Papandreou has announced his resignation, making way for a new coalition government.
Greek political leaders have agreed on a new government, Papandreou said on Wednesday as he stepped down. While he did not name his replacement, he said in an address to the nation: "I would like to wish every success to the new prime minister and of course the new government. I will stand by them and I will support them with all my strength."
Greece would implement an EU bailout decision and do all it can to stay in the euro, he added.
Sources from the two major parties said earlier on Wednesday that party leaders have agreed on speaker of the Greek parliament Filippos Petsalnikos, an experienced politician, to head the country's new coalition government, barring any last-minute changes.
The coalition will be put in place to implement the drastic restructuring program and to prepare for fresh elections.
"We have agreed on Petsalnikos but things can change between now and when the prime minister sees the president," a source close to the discussions between the ruling Socialists and the conservative opposition New Democracy told Reuters on condition of anonymity.
For days, the parties have been bargaining over the formation of a transitional government to lead the country. The socialists and conservatives had previously resisted such a national unity coalition for months. But while they finally accepted on Sunday that it was necessary, the question of who will get what post -- including that of prime minister -- has been the source of bitter quarrels over the past few days.
Yet the parties have no choice: If they want to receive the next tranche of funding from the European Union and the International Monetary Fund in order to save Greece from bankruptcy, they have to come to an agreement.