Spain is one of the European countries hit the hardest by the housing crisis, which has a very visible aspect: unsold homes, vacant after a building bubble collapsed, leaving the real estate market in tatters. Now the government is prepared to offer residency permits to foreigners who purchase homes valued at €160,000 ($204,000) or more.

The details of the plan are still being discussed by the government, but will be finalized in the coming weeks. The length of the residency permits will be determined by then.

There are over 700,000 unsold homes since the real estate market collapsed in 2008, the Associated Press reported, many of them repossessed from families who could not afford their mortgage payments amid Spain's economic recession.

The plan aims to revive Spain's distressed construction sector, which has screeched to a halt due to the lack of new home buyers.