Recession-stricken Spain—where GDP has dropped for five quarters in a row—needs outside investors. But while there may be bargains to be found among distressed Spanish companies, investors should beware of the quirks in Spanish insolvency law.

The Spanish Insolvency Act (SIA), which went into effect in 2004, introduced significant changes to an insolvency regime that dated back to the 1800s. “At the time, [the act] was heralded as a breakthrough,” says Conrado Tenaglia, a London-based partner at Linklaters. “Spain had never had a formal insolvency procedure.” Still, the SIA was largely a tool for liquidation and didn’t encourage financial restructuring for viable companies.

A 2009 amendment to the law limited the use of clawbacks in restructurings, allowing the insolvent company to be reimbursed for funds paid out two years prior to the bankruptcy if an agreement causes an “economic loss” to its assets. It encouraged fast-track composition agreements, meaning that judicial approval of a refinancing agreement is now possible before insolvency proceedings begin, and allowed the injection of “fresh money” through prepetition refinancing agreements. Lawyers say that the amendment was a move in the right direction, but that it didn’t go far enough.

“Insolvency [in Spain] isn’t an effective tool for restructuring,” says Agustin Cerda, a senior finance associate in Cuatrecasas, Gonçalves Pereira’s Madrid office. “It should only be used as a last resort.”

Spanish law lacks an instrument similar to the United States’s Chapter 11 or the United Kingdom’s Scheme of Arrangement. “There is no access to capital once you file for bankruptcy,” says Cerda. As a result, he adds, 94 percent of insolvencies end up in liquidation, and only 6 percent successfully restructure. In addition, court-appointed bankruptcy trustees have more control than creditors. “There is no creditors committee in Spain,” says Ignacio Buil, a senior finance associate at Cuatrecasas in Madrid. “The bankruptcy trustee doesn’t represent the creditors. He works to maximize the value of the estate.”

Spanish law also makes it nearly impossible to orchestrate a debt-for-equity swap within insolvency proceedings, and it lacks a mechanism like Chapter 11′s section 363 to let debtors sell unencumbered, noncore assets to raise cash.

Such legal restrictions give debtors and creditors a clear incentive to reach an agreement outside of court. But in Spain, that’s easier said than done. “In order to stay out of court, you need to have a unanimous agreement between the debtor, the shareholders, and the creditors,” says Pedro de Rojas, a banking partner at Linklaters’s Madrid office. “A minority shareholder can highjack the process and force it into insolvency court.”

So lawyers representing Spanish parties with stakes in distressed companies are now seeking out jurisdictions with more restructuring-friendly bankruptcy laws—in particular, the U.K. In May 2010 the English High Court sanctioned the first-ever English scheme of arrangement undertaken by a Spanish company. La Seda de Barcelona SA, a plastic drink container manufacturer, had defaulted on a €600 million loan ($768 million). Represented by Cuatrecasas and Freshfields Bruckhaus Deringer, it managed to slip its debt restructuring plan under the jurisdiction of the English court because its senior facilities agreement was governed by English law, many of its lenders were U.K.–based, and the company had subsidiaries, a branch office, and an employee in the U.K.

Likewise, in April 2011 property company Metrovacesa secured a U.K. scheme of arrangement to restructure its debt with a $4.5 billion syndicated loan. In October apparel retailer Cortefiel implemented an amend-and-extend agreement—in which lenders agree in advance to extend the maturity date of their loans—via a U.K. scheme of arrangement.

“I think we will see more of these [schemes of arrangements] in the coming months,” says Pedro de Rojas, a banking partner at Linklaters’s Madrid office.

In the meantime, many lawyers say that the government needs to further amend the SIA to help attract foreign investors—and perhaps reduce the stigma still associated with bankruptcy in Spain. “In the U.S., airlines go bust all of the time,” says Miguel Lamo de Espinosa, head of the London office of Gomez-Acebo & Pombo. “In Spain, that’s an issue.”