Greece and its creditors have agreed on a third austerity deal, involving loans of up to €86 billion, the European Commission has confirmed. The agreement comes after 18 hours of negotiations overnight.

"Ultimately, the agreement has been reached at the technical level in Athens," the representative said Tuesday, TASS reported.

Greek Finance Minister Euclid Tsakalotos said “two or three small details” still need to be resolved.

READ MORE: Athens, creditors close to final accord on €86bn bailout – media

The International Monetary Fund, one of Greece’s key creditors, has also signed up to the agreement. At the end of July the body said it wouldn’t join the bailout unless Athens agreed to a “comprehensive set of reforms” and creditors for debt relief.

READ MORE: IMF won’t join Greece’s rescue unless creditors agree on debt relief - media

On Tuesday, the Greek Finance Ministry said its government and the international creditors managed to agree on the two major issues – a new privatization fund that will accumulate state assets worth around €50 billion over the next 30 years and the game plan to tackle the problem of overdue loans totaling €90 billion.

Negotiations on the technical agreement will conclude later on Tuesday. European Commission President Jean-Claude Juncker will speak with French President Francois Hollande and German Chancellor Angela Merkel later today, FT reports.

Earlier, it was reported that the two sides had agreed on a target for 2015 of a primary budget deficit of 0.25 percent of GDP, moving to a primary surplus in 2016 of 0.5 percent of GDP. In 2017, the primary surplus target is 1.75 percent, rising to 3.5 percent in 2018, ANA news agency reported.

Greek shares rise, bond yields fall as bailout deal reached http://t.co/K2szn6k7Hipic.twitter.com/7QYAHPkrSV — Kathimerini English (@ekathimerini) August 11, 2015

Greece needs to make a payment of €3.2 billion to the European Central Bank by August 20, and a further payment of €1.5 billion to the IMF in September. The country needs up to €86 billion to avoid economic collapse. Previously, Greek officials said August 18 was the latest date for a deal to be reached.

Athens hopes to receive a first tranche of at least €20 billion as soon as the bailout is approved. Over time, Greece aims to use €12 billion for debt repayments, €10 billion for the recapitalization of Greek banks and €5.3 billion in payments state suppliers, according to the Financial Times.