Greek Prime Minister George Papandreou has survived the crucial no-confidence vote on his leadership.
Members of the Greek parliament returned a result of 153 to 145. The PM needed 151 votes to survive.
The eurozone bailout package now looks certain to be passed.
On Saturday, Papandreou will meet the Greek President and request to form a coalition government.
According to Finance Minister Evangelos Venizelos, the new government will last until the end of February.
The result will raise a sigh of relief across the Europe, particularly with the leaders at the G20 summit in Cannes, France, which has been overshadowed by the drama in Athens.
A majority no vote would have been tantamount to a public default on the Greek debt throwing the beleaguered eurozone project into further chaos.
The much-needed euro130 billion tranche of bailout cash will now be paid to Greek treasury, while European banks will write off half the money owed by Greece, amounting to around euro100 billion.
The vote was secured after a day of turmoil in Athens in which the viability of the ruling socialist party looked increasingly uncertain.
There were several reports that Papandreou would resign even if he won the vote.
Before the vote, the beleaguered PM delivered a defiant if rambling speech asking for a vote of confidence so that his country "has a government to take necessary steps of security over the next few months".
He said he would look to set up a coalition government, calling for greater collaboration and cooperation between the political parties.
"Honest and broad backing is called for," he told deputies.
"The changes that need to take place are historic and require citizens' participation."
"I have excluded nothing from the discussion," he said, adding: "even my own position."
"Even my re-election does not interest me. What interests me is saving the country."
Despite reports of several possible defections from Papandreou's own Pasok party, all voted in his favour, along with two independent MPs ensuring the majority.
"I do not want to humiliate my party's president – the country's prime minister – by toppling him tonight,” said Telemachos Hytiris, a government spokesman, speaking before the crunch vote.
“I want him to rise to the occasion as a prime minister who has won the vote of confidence with prestige and start discussions tomorrow on a unity government so the country can move forward.”
On Thursday Antonis Samaras, the leader of the conservative New Democracy opposition party, called for the bail out to be agreed and for a snap election, in which his party is likely to win the most seats.
"I'm asking for the formation of a temporary, transitional government with an exclusive mandate to immediately hold elections. And the ratification of the bailout deal from the current parliament," he said.
The vote follows days of uncertainty after the prime minister's shock announcement that the government would hold a referendum on the eurozone bailout.
On Thursday, following pressure from eurozone leaders meeting at the G20 summit in Cannes, the referendum was scrapped, leading to a chorus of calls for Papandreou to quit.
Outside the parliament in Athens, thousand of protesters gathered, many from the Greek Communist Party.
The uncertainty in Athens has overshadowed efforts to tackle the European debt crisis by world leaders in France, with questions over Papandreou’s leadership, alongside the country’s continued involvement in the eurozone project, causing havoc with global markets.