ATHENS - Greece’s three main pro-euro parties neared a deal to form on Wednesday a coalition that will have to deal with a devastating economic crisis and try to renegotiate an unpopular EU-IMF bailout deal.

New Democracy leader Antonis Samaras who won Sunday’s elections has been holding talks with the socialists Pasok and the small Democratic Left party under intense pressure from financial markets and world powers to move quickly and get Greek reforms back on track.

Pasok leader Evangelos Venizelos said following talks on Tuesday that a coalition agreement was possible “by midday tomorrow” - just hours before a deadline for conservatives New Democracy to form a coalition runs out. Venizelos, a former finance minister, said the “only practical solution” was for a coalition with New Democracy, Pasok and the Democratic Left. Samaras, 61, a US-educated former foreign minister, is to be prime minister, Greek media reported, saying there had been a deal between the parties.

Samaras will have to contend with a surge of public anger over the austerity imposed by the bailout. After all, New Democracy only narrowly won the historic elections against the radical leftist Syriza which wants the bailout deal torn up.

New Democracy took 129 of the 300 parliamentary seats including an extra 50 seats for the winner and Syriza took 71 seats after garnering more than a quarter of the vote in a country struggling with its fifth year of recession.

Pasok took 33 seats and Democratic Left won 17 seats, although local reports said their lawmakers may not actually be included the new government and the parties would support experienced technocrats in their place.

The results of Greece’s most critical elections since the end of military rule in 1974 have eased fears of an immediate euro exit that would have shocked the global economy but left a stand-off with foreign creditors on the card. While promising to respect Greece’s commitments, Samaras also wants an easing of the bailout “so the Greek people can escape from today’s torturous reality”. Venizelos, who led some of the bailout negotiations in February as finance minister, said the terms of the loans were “unfavourable,” adding: “Many of the terms were imposed on us.”

He noted that a ‘national negotiation team’ would seek to revise the agreement with Greece’s international creditors. The key issue was “not the composition of the government but the national negotiation team that will aim for the best possible renegotiation of the loan agreement” to fight recession and unemployment, Venizelos said.

European Union leaders and the International Monetary Fund say an extension of a key deficit deadline is possible but the content cannot be changed and have suspended the multi-billion euro loans until the political situation is clear.

“There can be no discussions about changing the substance of the agreements but as I indicated three or four weeks ago we can by all means talk about extensions,” Eurogroup chief Jean-Claude Juncker told Austrian radio.

But ahead of talks among euro finance ministers on Thursday, a senior European Union official said it would be “delusional” and “stupid” to keep the February loan agreement intact as the economic environment has changed.

Under the current conditions, Greece has to cut 11.5 billion euros - the equivalent of five percent of its gross domestic product - by 2014, although Greek parties have called for this deadline to be put off to 2016.

Greece has been forced to seek bailouts twice, first for 110 billion euros in 2010 and then for 130 billion euros earlier this year. It has also had a 107-billion-euro private debt write-off.

In the mean time it is running out of money. Before the election, finance ministry officials cited in the Greek press warned there were only enough cash reserves to pay public sector salaries and pensions until July 20.

Greece has however stepped up short-term debt auctions to restock its depleted treasury and held a three-month treasury bill sale on Tuesday - its first since the election - in which it raised 1.3 billion euros ($1.6 billion).

The interest rate for the auction was 4.31 percent, slightly lower than the 4.34 percent at a previous equivalent sale on May 15.

The Athens Stock market closed 3.34 percent higher - in line with rises seen on other European stock markets on eurozone hopes.

Analysts however were still downbeat about the prospects for Greece.

“In Greece, the political situation looks fragile and not strong enough to diminish the scenario of a Greek exit” from the euro, said Neil MacKinnon, an analyst at VTB Capital financial group.

The eurozone is hoping the result can draw a line under a lengthy period of uncertainty that has unsettled markets in a country where the sovereign debt crisis kicked off in 2009 before spreading across the continent.