Political leaders finally decide on a course that would avert a chaotic default for the debt-choked nation

After three days of high drama, political posturing and brinkmanship, Greece's coalition government reached a tentative agreement on the draconian terms required to unlock €130bn (£109bn) in aid for the crisis-hit country on Wednesday night, although the marathon negotiations were set to continue into the small hours.

One senior aide said that by the time the Greek finance minister, Evangelos Venizelos, boarded a plane at 7am to attend Thursday's eurogroup meeting in Brussels, he would have the "finalised text of the agreement in his hands".

In the first concrete sign that Greece's feuding political leaders had decided on a course that would avert a chaotic default for the debt-choked nation, prime minister Lucas Papademos said that consensus had been achieved over all but one of the cost-cutting reforms the EU, European Central Bank and IMF are demanding in return for the rescue programme.

"There has been agreement on all issues except one," Papademos's office said in a statement released after seven hours of talks between the technocrat leader and the three party heads backing his interim administration. The final obstacle to the politicians signing the accord was supplementary pensions, the one area where all three party chiefs were determined to avoid further cuts prior to general elections in the spring.

But with the Greek government resuming negotiations with the country's "troika" of foreign lenders at 1am, officials appeared confident that the sticking point would be resolved by the morning.

"The negotiations have essentially been closed," said a senior official.

The 17-nation eurogroup is expected to discuss and ratify the agreement Venizelos will present to them later in the day, with analysts interpreting it as another positive sign that the bailout deal would finally be sealed. The eurogroup had originally want to seal the deal on Monday but wrangling over the austerity measures meant that the deadline was missed.

Antonis Samaras, the New Democracy party leader, said the negotiations would continue "because at this time of great pain we have to think about pensioners".

The centre-right politician, who had thwarted agreement by persistently raising the issue during the talks, has been a vocal opponent of the "growth through austerity" polices meted out to Greece by the EU and IMF.

Throughout the talks, Papademos, a former vice-president of the ECB, repeatedly interrupted the talks to speak with Jean-Claude Juncker, the eurogroup chairman, and IMF chief Christine Lagarde.

Panic hovered over the talks, widely seen as a last chance for Greece to keep bankruptcy at bay. Athens faces debt repayments amounting to €14.5bn in barely six weeks' time – money it simply does not have. Taking the discussions down to the wire had exasperated European leaders and seen markets gyrate in recent weeks.

The prospect of further austerity has whipped up widespread anger among Greeks with unions vowing a ferocious "and possible uncontrollable" backlash.