By George Georgiopoulos
ATHENS, Aug 8 (Reuters) - Greek government officials discussed a draft of the country's third bailout agreement drawn up on the basis of discussions with EU/IMF lenders, a government official said on Saturday, boosting hopes a deal could be wrapped up in days.
Athens is racing to wrap up the bailout agreement of as much as 86 billion euros by as early as Tuesday in a bid to get the first disbursement of aid by Aug. 20, when it faces a debt payment to the European Central Bank.
Officials from European Union and International Monetary Fund lenders met Greece's finance and economy ministers in Athens on Saturday, the day after EU finance officials held a teleconference and noted progress in the talks.
The talks on Saturday focused on the so-called "prior actions" Greece must legislate to qualify for loans, and the two sides reached agreement on the issue, a senior government official said without giving details.
Talks will continue on Sunday to discuss more contentious issues, the official said.
"The agreement will be concluded comfortably before Aug.18," the official said.
Greece narrowly dodged a euro zone exit last month after months of acrimonious negotiations that culminated with Prime Minister Alexis Tsipras clinching a deal tied to stringent austerity and reform terms to avoid economic collapse.
Since then negotiations on the agreement itself - which will spell out details of the reforms and funds to be disbursed - have proceeded remarkably smoothly, with the lenders praising Greece for its cooperation.
The view of EU officials on Friday's conference call was that talks are proceeding well and may be completed over the weekend, one source familiar with the matter said.
If a draft memorandum of understanding and an updated debt sustainability analysis are ready as planned on Tuesday, the Greek government and parliament would be expected to approve them by Thursday.
This would open the way for euro zone finance ministers to meet or hold a teleconference on Friday to endorse the up to 86 billion euro three-year loan program for Athens.
Greece would be expected to enact another package of reform legislation before Aug. 20, in parallel with national ratification procedures to receive a first aid payment in time to meet the ECB payment. (Writing by Deepa Babington; Editing by David Gregorio)