The eurozone is ready to offer Spain an initial 30 billion euros to help its distressed banks, Jean-Claude Juncker, the head of the eurozone finance ministers group says.
After nine hours of talks that lasted until early on Tuesday morning, the 17 ministers reached a memorandum of understanding to be formally signed "in the second half of July", with 30 billion euros ($A36.5 billion) to be injected at the end of the month.
The 17 countries that use the euro have committed to support a loan for Spain's banks of up to 100 billion euros, but the precise amount needed may not be known until September, when the results of all the bank inspections are in, EU spokesman Simon O'Connor said on Monday.
The 17 ministers - some of whom will need to get approval from their parliaments - will meet later in July to give final approval to their document.
Spain 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 weighed down by toxic loans and assets from a collapsed property market.