Greece's Prime Minister George Papandreou faces a crucial confidence vote in parliament on Friday with the outcome on a knife-edge.Mr Papandreou shocked EU partners and sent markets into turmoil after calling for a referendum on a hard-fought EU deal to bail out debt-ridden Greece.While the prospect of a referendum has receded, even if the PM wins his future is unclear, amid new calls to resign.The developments have overshadowed a key G20 meeting in Cannes.It continues for a second day on Friday.The figures in the Greek parliament reveal Mr Papandreou's vulnerability.His governing Socialist party (Pasok) holds a tiny majority - 152 out of 300 seats.A handful of his MPs had indicated they would refuse to back him in the confidence vote, which is expected late on Friday, possibly around 22:00 GMT.However, the BBC's Mark Lowen in Athens says there are suggestions some potential rebel MPs will now support Mr Papandreou since the likelihood of a referendum has eased.There had been serious divisions in Pasok on the referendum, with Finance Minister Evangelos Venizelos insisting it should not be held.Mr Papandreou then said the referendum was never an end in itself, and there were two other choices - an election, which he said would bankrupt the country, or a consensus in parliament.He called for talks with the opposition on a coalition government.The strategy of the main opposition New Democracy is unclear.Its leader Antonis Samaras on Thursday led his MPs in a dramatic walkout of parliament and called for snap elections.Mr Samaras questioned the motives behind Mr Papandreou's actions."I am wondering; Mr Papandreou almost destroyed Greece and Europe, the euro, the international stock markets, his own party in order to ensure what? So that he could blackmail me and the Greek public? Or to ensure what I had already said several days ago; that I accept the bailout agreement as unavoidable?"New Democracy MP Simos Kedikoglou told the BBC's World Today programme that while it backed adopting the bailout, that did not mean it supported Mr Papandreou remaining prime minister.So even if Mr Papandreou survives, speculation will mount about his positionGovernment sources told Reuters news agency that Mr Papandreou had agreed at a cabinet meeting on Thursday to stand down once he had negotiated a coalition with the opposition.One source said: "He was told that he must leave calmly in order to save his party. He agreed to step down. It was very civilised, with no acrimony."European Commission President Jose Manuel Barroso told the BBC's Today programme he expected a government of national unity to be formed and that the economic problems "will be solved".He said that it was in Greece's interest to stay in the euro."We would like them to stay... in the end it depends on them," he said.The G20 will continue its meeting in Cannes on Friday.The leaders are expected to discuss ways to increase the firepower of the International Monetary Fund (IMF).At the end of the first day, the French host, President Nicolas Sarkozy, said France and Germany had helped Greek politicians focus on what was at stake.Mr Papandreou had been summoned for urgent talks at the G20 on Wednesday, where he was told that any referendum would turn on the question of whether Greece wanted to stay in the eurozone.They also put on hold the next tranche of Greece's existing bailout.The EU bailout deal, agreed last month, would give the heavily indebted Greek government 130bn euros (£111bn; $178bn) and it imposes a 50% write-off on private holders of Greek debts, in return for deeply unpopular austerity measures.Analysts say eurozone leaders must solve the Greek problem swiftly or risk the crisis spreading to other vulnerable economies, particularly Italy.Although the Greek public has strongly resisted the severe austerity measures a recent opinion poll in a newspaper showed 70% wanted to remain within the eurozone.