I do not know how it works in Spain, but here in the UK, if you had the keys back that is not the end of things. You still owe whatever you borrowed. Giving the keys back means that they can sell the house maybe, but any losses will still be down to you. Of course It may be that you live in the UK and they would/could not pursue you – who knows. I would get some legal advice in Spain before just walking off.