Spain is littered with vacant lots and half-built apartment complexes, where developers ran out of money when the construction bubble burst.

But in one Madrid barrio, neighbors are putting an abandoned tract of urban space to creative use.

Behind a chain link fence, in a dusty weed-filled lot between two soaring apartment blocks, Emilio de la Rosa is planting vegetables.

"Different types of products — garlic, beans, tomatoes, lettuce," he says. "We're teaching our children where tomatoes come from — not from the grocery store, but the ground."

A generation ago, this was farmland just outside Madrid's city center. But Spain's economy boomed in the 1990s, and municipalities sold off land to developers. Credit and labor were cheap, and condos went up fast.

Then the bubble burst, leaving Spain littered with half-built houses, or land cleared for construction that never began. That's allowed de la Rosa and his neighbors to obtain a one-year permit to create an urban garden, on land slated for development.

"The idea is, with this type of land — OK sure, it might be built on tomorrow, but today it's not going to be, because look around at all the empty housing here," he says. "So this is a timely project. This land has spent a ton of years empty. So fine, if they want to build a commercial center here, go for it. Just give me one year to grow my seeds."

More Houses Than Families

People here joke that Spain's construction boom left the country with at least two houses for every family. More than 600,000 homes are for sale nationwide. But the real surplus could be much larger. Most aren't on the market. They're owned by banks, or developers who've gone under.

Jesus Maldonado, who teaches urban planning at a university in Madrid, uses this example of open land and half-built houses to teach his students what not to do in the future. "With the already-built houses, if developers can no longer pay, they get transferred to banks, which will eventually sell them," he says. "Sure, they'll lose money on the deal. But it's better to lose a little bit — even half your money — than the whole thing."

House prices have fallen 22 percent since their peak here. But with that surplus hitting the market, they're forecast to fall even more. Maldonado says the even bigger problem is abandoned land.

"What happened in the housing bubble is that too much land was classified for urban development. And that land was even more expensive than the houses," he says. "So when that derelict land now falls to the banks, they won't be able to sell it. Because no one wants it. Nobody wants it because nobody is looking to build. There's no more demand."

Gardens Prove Popular

And with no demand for yet another apartment block in this Madrid neighborhood, de la Rosa's garden looks safe.

Watering some spinach seeds, he reflects on what he says could be a silver lining to Spain's debt crisis — at least in his little barrio — a change in people's values.

"Before, the mentality was, 'On Sundays, let's go to a big shopping mall and spend the whole day there.' But now people are starting to think, 'Maybe we should spend a day in the countryside, in a garden or a park.' The mentality here is changing. We were too focused on consumerism before the crisis," he says.

Amaro Lopez, 24, has lived all his life across from the empty lot. He admits he was curious about maybe a new coffee shop or arcade being built there. But he's unemployed now, and can't go shopping anyway. So he walks his grandmother's dog over to the new garden.

Copyright 2016 NPR. To see more, visit http://www.npr.org/.