A deal is in the works that would allow Spain to recapitalize its stricken banks with aid from its European partners but avoid the embarrassment of having to adopt new economic reforms imposed from the outside, German officials say.
While Berlin remains firm in its rejection of Spain's calls for Europe's rescue funds to lend directly to its banks, the officials said that if Madrid put in a formal aid request, funds could flow without it submitting to the kind of strict reform program agreed for Greece, Portugal and Ireland.
Instead, Spain would only have to agree to new conditions tied to the reform of its banking sector. Berlin is also exploring the possibility of funneling aid to Spain's bank rescue fund FROB to reinforce the message that it is the country's banks and not its public finances which are at the root of its problems.
The evolving German stance on aid for Spain is the latest evidence that Chancellor Angela Merkel is adopting a more flexible approach to solving the euro zone's deepening debt crisis.
With an IMF report on Spain's banks looming next week, officials say all the pieces are in place to move within days on an aid deal for Madrid. A package is expected by early next month at the latest, after an external audit of the banking system.
"One could imagine that conditionality would be focused mainly on the banks, because Spain has already tackled the other reforms," a senior German government official said on condition of anonymity because of the sensitivity of the situation.
"These packages are not aimed to punish, just to ensure that the necessary reforms are being implemented."
Spain's Economy Minister Luis de Guindos reiterated on Wednesday that his country had no immediate plans to request a bailout and was awaiting the external audit in late June.
Berlin is certainly shifting positions. Last week, it signaled it supported granting Spain an extra year to cut its deficit to the EU's 3 percent of gross domestic product threshold, having previously held fast to the notion that austerity drives should not be diluted.
Merkel has also sent the message that she is open to Europe-wide supervision of the banking sector, albeit as a "medium-term" goal, one element of a proposed "banking union" to break the vicious circle of interdependence between Europe's financial institutions and its sovereigns.
But she must tread carefully. Some of her political allies and leading conservative newspapers have come out strongly against other aspects of a banking reform, including the idea of a Europe-wide deposit guarantee scheme.
Worries about Spain's banks and a bailout backlash in Greece, which holds an election on June 17, have heightened the sense of alarm over the debt crisis which erupted nearly three years ago and shows no signs of abating.
Spain's borrowing costs have now shot up to levels that many experts see as unsustainable. Because of the size of its economy, Spain would stretch the limits of Europe's dual rescue funds - the European Financial Stability Facility (EFSF) and soon-to-be approved European Stability Mechanism (ESM) - if the country were to require a full rescue that kept it out of the capital markets for several years.
This has focused minds in Berlin, where officials have been working feverishly on a deal that would allow Spain to avert the shame of a formal state bailout, without loosening rules that explicitly prevent direct aid to banks.
German officials have quietly been pushing Spain to accept a bailout for weeks and Volker Kauder, the head of Merkel's Christian Democrats (CDU) in parliament, became the most prominent politician to say so publicly on Wednesday.
"I do think that Spain has to seek a rescue, not because of the country itself but because of its banks," Kauder told public television station ARD.
A series of audits being conducted on Spain's banking sector are expected to reveal an additional hole of between 30 to 70 billion euros, over and above the 80 billion euros already provisioned.
The government has already been forced to nationalize its fourth-biggest lender Bankia.
Multiple sources said the German finance ministry was exploring the possibility of channeling EU aid directly to Spain's Fund for Orderly Bank Restructuring (FROB), but that this would only work under the ESM, which is due to come into force next month.
"Nobody wants the EFSF for Spain. It's too restrictive," a second senior official said, pointing to the added flexibility contained in Article 19 of the bloc's permanent rescue mechanism.
That article states explicitly that the board of governors of the ESM are allowed to make changes to the financial assistance instruments laid out in the facility's statutes.
A senior French official who has been in contact with the Germans said negotiations were heating up and that there was a broad consensus now among member states on using the EFSF or ESM to help Spanish banks.
"The Europeans want to cut the link between the banks and the sovereign. That's what is being discussed. There are plans to do that in the long run (through a banking union) but the idea is also to apply that to Spain," the official said.
Another source with knowledge of the discussions said Spanish politicians were pushing for a broad political agreement on rescuing the country's banks and wanted conditionality limited to the financial sector to make the rescue more politically manageable at home.