Greece and its international lenders clinched a multi-billion-euro bailout agreement on Tuesday after marathon talks through the night, officials said, raising hopes aid can be disbursed in time for a major debt repayment due next week.
After a 23-hour session that began Monday morning, exhausted Greek officials emerged in a central Athens hotel to announce the two sides had agreed on terms of the three-year agreement barring a couple of minor issues being ironed out.
"Finally, we have white smoke," a finance ministry official said. "An agreement has been reached."
Finance Minister Euclid Tsakalotos confirmed only "two or three small issues" were pending. Greek shares rose, with the banking index surging 6 percent, while two-year bond yields fell more than 4 percentage points.
An agreement would close a painful chapter of aid talks for Greece, which fought against austerity terms demanded by creditors for much of the year before relenting under the threat of being bounced out of the euro zone.
After a deal in principle last month on keeping Greece in the euro zone, the latest round of talks began in Athens three weeks ago to craft the agreement with details on reforms measures, the timeline for implementation and amount of aid.
The pact is expected to be worth up to 86 billion euros ($94.75 billion) in fresh loans for debt-ridden Greece, but there was no immediate confirmation of its size.
Greek officials have said they expect the accord to be ratified by parliament on Wednesday or Thursday and then vetted by euro zone finance ministers on Friday. This would pave the way for aid disbursements by Aug. 20, when a 3.2 billion euro debt payment is due to the European Central Bank.
Facing a revolt from the far-left faction of his leftist Syriza party, Prime Minister Alexis Tsipras is expected to once again rely on opposition support to push the package through parliament. Once the deal is ratified, Tsipras is expected to tighten his grip over the party by facing down rebels at a party congress next month before considering early elections.
Even then, doubts remain about whether a leftist government elected on a pledge to reverse austerity can implement the punishing terms of an agreement that critics say compromises the basic principles it stands for.
Popular misgivings about funneling yet more money to Athens also run particularly deep in Germany, the euro zone country that has contributed most to Greece's two bailouts since 2010.
Berlin has cautioned that the focus in talks must be on "quality before speed", raising questions about whether it will seek to slow down the process by insisting on strict conditions attached to any aid.
"We're talking about a program for three years, it needs to be negotiated thoroughly," Deputy Finance Minister Jens Spahn told Germany's ARD television shortly before the deal was announced. "It must be convincing that it's not just about Aug. 20."
The latest round of talks with inspectors from four creditor institutions - the European Commission, European Central Bank, the European bailout fund and the International Monetary Fund - progressed smoothly in Athens, in contrast to the acrimonious negotiations for most of the year.
During talks that dragged through Monday night, the sides reached agreement on the three main sticking points - dealing with non-performing loans held by banks, setting up an asset sales fund, and deregulation of the natural gas market.
Athens wanted to set up a "bad bank" to take on the problem loans, while creditors want them bundled and sold to distressed debt funds. It was not immediately clear how that was resolved.
Officials had also argued over how to set up a sovereign wealth fund in Greece designed to raise 50 billion euros from privatizations, three-quarters of which would be used to recapitalize banks and to reduce the debt.
A few technical details on measures - such as a law governing individual bankruptcies - that Greece must pass before getting aid were still being discussed between technical experts from both sides, another Greek official said.
The marathon session overnight also found common ground on final fiscal targets that should govern the bailout effort, aiming for a primary budget surplus -- which excludes interest payments -- from 2016, a government official said.
Adapted from an earlier baseline scenario, the targets foresee a primary budget deficit of 0.25 percent of gross domestic product in 2015, a 0.5 percent surplus from 2016, 1.75 percent in 2017, and 3.5 percent in 2018, the official said.