Greece has taken all the legal action needed to secure a second bailout from the euro zone countries, Eurogroup President Jean-Claude Juncker said on Thursday, opening the door to the first tranche to be paid out by March 20 if more conditions are met.

The money can be paid out only after the completion of a bond swap between Athens and private investors which is to be concluded by March 9 and which aims to halve Greece's privately-held debt, cutting it by 100 billion euros (83.4 billion pounds).

All required legislation by the parliament and the ministerial cabinet has been adopted and a few pending implementing acts should be completed shortly, Juncker said in a statement after a meeting of euro zone finance ministers.

Athens has passed laws on fiscal consolidation, pension reform, financial sector regulation and structural reforms. It still has to issue some decrees and other ministry decisions that will translate the laws into action.

This will allow the Greek adjustment effort to regain momentum, which - together with a rigorous implementation of the agreed policy package for the new programme - constitutes the basis for putting the public finances and the economy of Greece back on a sustainable path, the statement said.

The second financing programme for Greece, which follows a 110 billion bailout agreed in May 2010, will total 130 billion euros, plus 34.4 billion euros of the undisbursed remainder of the first programme.

Included in the second programme is up to 30 billion euros of sweeteners designed to smooth the bond swap, in which private investors will forgive Athens 53.5 percent of the nominal value of their Greek bonds.

That process can now go ahead, with the euro zone's EFSF bailout fund authorised by euro zone ministers to raise the funds to carry out the operation.

The ministers also agreed on a backstop facility for the recapitalisation of Greek banks. No figures were given but two euro officials said 23 billion out of the 130 billion euros was earmarked for that purpose. Another official said it could be as much as 40 billion.

The Eurogroup also agreed to raise money to pay accrued interest on Greek bonds, which officials said was 5.5 billion.

However, the bond exchange must be completed first. It opened on February 24 and is scheduled to close on March 8.

The Eurogroup ... reiterates that a successful PSI operation (bond exchange) with high participation and a final positive assessment of the complete set of prior actions are necessary conditions both for the disbursements of these EFSF bonds and for the second programme, Juncker said.

The Eurogroup therefore looks forward to a high participation of private creditors in the debt exchange.

Greek Finance Minister Evangelos Venizelos signed five agreements on the planned debt swap and other issues related to the 130 billion bailout, sending what he said was a message to the private sector, the markets and the international community that the official sector supports Greece in every aspect.

Greece has said it is not obliged to carry out the bond swap unless it gets 90 percent participation. If participation is below 90 percent but above 75 percent, Greece would consult with public creditors.

If the rate was less than 75 percent and it did not receive required consents, it would not go through with the deal.

Greece has passed legislation introducing collective action clauses (CACs) that allow it to force all bondholders to proceed with the swap once it has secured a specified level of approval.

Based on the recently approved law, the exchange will go ahead once 50 percent of bondholders have responded to the offer and the clauses will be activated once a two-thirds majority of that quorum has voted in favour of the swap.

NOT OUT OF THE WOODS YET

To get the support of euro zone ministers for the bailout, the Greek parliament approved on Wednesday an extension of pharmacy opening hours and cuts to spending on drugs, the final significant element in a package of three dozen prior actions euro zone countries had demanded before more aid is provided.

Finance ministers are scheduled to meet again on March 12, the first date that they could give final approval for the package, which aims to cut Greece's debt to 120.5 percent of gross domestic product (GDP) by 2020, from 160 percent now.

The biggest concern for finance ministers is that, as in the past, Greece will fall behind on meeting the programme's targets on structural and labour market reforms required to overhaul the economy and return it to competitiveness.

The first formal review of the second package will come three months after it is signed off, probably in June, although as part of the deal there will also be a dedicated group of inspectors on the ground in Athens monitoring the government's every step in meeting its obligations.

Any indications of slippage and the IMF, or the European Commission, or both, could decide that Greece is beyond assistance and leave it up to Athens to decide if a deeper debt restructuring or full default is necessary.

(Additional reporting by Renee Maltezou in Athens; Writing by Luke Baker and Jan Strupczewski, editing by Mike Peacock)