A decade ago, Spain was a basket case. It had built up massive debt, and it was falling into a Depression. Today, Greece is in a similar situation, although the details are different.
A good part (certainly not most) of the travails of both countries can be traced the stupidity of the Green environmental agenda.
In Spain, it was the lure of profits from Carbon Credits which led to their difficulty. There was supposed to be an efficiently running market for these Carbon Credits, and Spain hoped to generate tons of these credits which could be worth Billions!