Boosted by strong economic growth, close to 465,000 property sales or purchases were recorded in 2017, "the highest annual figure since 2008," a report by Spain's national property register showed.
That represents a rise of close to 15 percent from 2016.
Spain witnessed a property boom at the end of the 1990s with dizzying price rises.
From 2008, this bubble burst as a global economic crisis slowed down the Spanish economy, preventing many borrowers from paying back their property loans.
Prices collapsed and only started rising again in 2014 when the Spanish recession ended.
In 2017, property prices increased an average of 7.6 percent in Spain compared to the previous year.
But they are still 21 percent lower than 2007 at the height of the real-estate bubble.
Strong economic growth -- 3.1 percent in 2017 -- has boosted the recovery of the housing market.
"Low interest rates along with a declining (although still-high)unemployment rate, which declined to 17 percent in 2017 from a record 27 percent in 2013, are supporting housing affordability," ratings agency Moody's said in a statement.
"Moreover, although it is likely that housing sales will exceed 500,000 properties during 2018 for the first time in a decade, this is still far from the nearly one million of annual housing sales before 2007," it said.
"Construction activity currently is at 40 percent of pre-crisis levels in 2007,partially correcting the oversupply in place before the crisis."
According to the register, some 13 percent of housing purchases were made by foreigners in 2017 led by British and French nationals.
In some particularly touristy areas, this proportion is higher, such as in the Balearic Islands where it stands at 35 percent, or the Canary Islands, where it reaches 29 percent.
Top end real estate agency Lucas Fox reported that Madrid was the hottest market in Spain right now.
The company, which specialises in the high-end market, has announced a 92 percent jump in the number of sales transactions and a 311 percent increase in sales value in the Spanish capital during 2017.
Moreover, the average price of a property sold by Lucas Fox Madrid was €1.4 million, more than double that of the average sales price in 2016.
According to the Spanish property portal Idealista, prices in Madrid grew by 12 percent in 2017.
Prices in the city centre increased by 22 percent whilst in the desirable districts of Chamberí and Salamanca, prices increased by 19% during 2017.
According to property-focused business school El Instituto de Práctica Empresarial (EPE), the trend looks set to continue in 2018, with prices predicted to rise by 11 percent.
“Madrid is where it's at right now. The buzz around the city in the last 12 months is palpable." explains Lucas Fox Director of Operations Rod Jamieson.
"Each week we are seeing exciting new constructions pop up across the city, whether it be an edgy real estate project or a state-of-the-art food mall, Madrid seems to have its finger on the pulse. The city generates almost 20 percent of the country's GDP – this impressive growth rate coupled with its competitive tax rates has made the Spanish capital an extremely attractive destination for property investors looking for new opportunities, particularly in districts which had stagnated in the crisis and are now regenerating.”