After a nail-biting finish to the debate, the national government's 2018 budget was approved by a majority of MPs on Wednesday. It had needed the support of other parties in order to get it passed and to keep public services running.
After finally presenting expenditure plans in April, ministers have been pushing the proposals through parliament ever since.
However it was unclear until the last moment if they would get the vital support of the PNV Basque Nationalist party that had said it would vote against if Madrid had not returned full devolved powers to Catalonia by now. In the end the PNV decided to back the budget, saying circumstances had changed.