Hello Shamsher,

It depends on when you are officially divorced.

You are obliged to notify the immigration office that you are divorced 3 months before or 3 months after you obtain the divorce.

Once divorced, if you have been living in Spain for 5 years, you will get residencia de larga duracion, which allows you to live and work in Spain for 5 more years, and you will have to renew it after 5 years again, like any other individual that has been legally living in Spain for 5 years. If you were not divorced at the time, you could apply for residencia permanente as a relative to an EU citizen tough this would not be real as you may be already divorced by then or in the process.

Once you have renewed your residence permit obtaining the larga duracion one, you can change your status to residencia permanente EU if you provide with a work contract. This indicates your sources of income and is a requirement for the EU permanent residence permit, that will certainly allow you to work in other EU countries.

Please feel free to contact me on Patricia at Lawbird.com if you wish to discuss your case in more detail.

Best Regards,