BRUSSELS (AP) The European Union worked towards stabilizing Spain's finances Tuesday as it backed up the blueprint for the country's 100 billion bank bailout plan with plans to grant the country an extra year to cut its budget deficit.

Finance ministers from the 27 EU countries, meeting in Brussels, approved extending Spain's deadline for achieving a budget deficit of less than 3 percent of its annual economic output, until 2014, said Vassos Shiarly, Cyprus' finance minister and chair of the meeting. The size of Spain's economy in 2011 is estimated to have been $1.5 trillion.

The move comes on the heels of an overnight meeting at which the 17 euro area finance ministers agreed on the terms of a bailout for Spain's troubled banks, saying that the first 30 billion ($36.88 billion) in aid can be ready by the end of this month.

Last month, the eurozone's finance ministers agreed to offer Spain up to 100 billion to prop up its stricken banking sector, which has been weakened by toxic loans and assets from a collapsed property market.

The finance ministers for the 17 countries that use the euro will return to Brussels on July 20 to finalize the agreement, having first obtained the approval of their governments or parliaments, eurozone chief Jean-Claude Juncker said.

Spanish Finance Minister Luis de Guindos said the bank bailout money however much is ultimately deemed to be necessary would be disbursed over 18 months.

"As far as cleaning up the Spanish financial sector is concerned, this is going to create profound, important possibilities," he said. "We have to take full advantage of this over the next 18 months."

De Guindos said that only one country Finland asked for collateral. "We are working with them on this," he said.

Spain's new budget targets are to have a deficit of 6.3 percent this year, falling safely under the 3 per cent ceiling to 2.8 percent in 2014, said EU Economic and Monetary Affairs Commissioner Olli Rehn.

Investors who had been concerned about the terms of Spain's bailout tentatively welcomed news of the ministers' decisions. Markets across Europe showed slight gains Tuesday afternoon. In Madrid, the country's main IBEX index rose 0.83 per cent to 6,742.20 while the borrowing cost of its 10-year bond dropped from 7.03 per cent Monday to 6.75 percent.

Juncker added that the Spanish deal will mean that each bank that receives a bailout will be forced to adopt specific conditions, and the supervision of the financial sector overall will be strengthened.

Dutch Finance Minister Jan Kees de Jager said the agreement should be finalized soon. "We hope this can be wrapped up within a week," he said.

The exact amount of the bailout will likely not be known until September, when individual examinations of different Spanish banks have been completed.

Spain the fourth-largest economy in the eurozone has been struggling to keep a lid on its government deficit in the midst of a recession while trying to support its troubled banking industry. There are fears that should Spain need a bailout of its own, the eurozone would struggle to finance it, pushing the region further into recession.

De Jager said Madrid's partners agree that "financial sector reforms in Spain must be ruthlessly implemented". However, he said a system of EU-wide banking supervision still needed to be worked out.

But on Monday, before the eurogroup meeting began, Mario Draghi, the chief of the European Central Bank, said he was confident that a banking union in the European Union would be achieved.

"We are talking about the long-term sustainability of the European monetary union. We are going as fast as we can. It is better to do things right than in a hurried fashion," Draghi told a committee of the European Parliament.

Rehn said the European Commission would put forward legislative proposals for the creation of a "Single Supervisory Mechanism" for banks in the euro area, involving the European Central Bank, in early September. The creation of the central bank supervision will allow the EU's firewall fund to recapitalize banks directly rather than lending the money to a country's government something that increases the country's debt load.

Irish Finance Minister Michael Noonan said it was about time.

"It was the crisis in Spain that eventually convinced the European authorities to do what Ireland has been arguing should be done for a long time separate the sovereign debt from banking debt," Noonan said.

Meanwhile, Greece's new finance minister, Ioannis Stournaras, said his country would work to get its budget-balancing program back on track, but Greece too will need extra time to meet its targets.

"I think the size of the recession justifies, as Spain got an extension, that we should ask for an extension," Stournaras said. He said he recognized it was still too early to expect a formal decision on the issue.

Ministers added that the final decision on Greece's request to renegotiate the terms of the country's bailout agreements will depend on the conclusions of the so-called "troika" of debt inspectors currently overseeing the Greek program. Rehn said a mission from the troika would go to Greece within the next two weeks to assess the country's short-term financing needs.

"I am sure we will find a solution to this problem," Rehn said.

Greece has had to impose harsh austerity measures, including big cuts to pensions and salaries, to secure billions of euros worth of rescue loans from the IMF and other European countries that use the euro and avoid bankruptcy.

The finance ministers also reelected Juncker to a new 2 1/2 -year term as president of the eurogroup. But Juncker said he would step down late this year or early next year.