Hi, Sagar. I’m a US citizen and I did what you are doing about 8 years ago and the process was the following: your employer gives you a form as a formal job offer that you need to take with you to, get this, a Spanish consulate in the U.S. Yes, to process your residency you need to do that from the U.S.
Along with that, you will need other documents at that time including a letter from a doctor confirming that you are in good health and a certificate from a police station where you lived in the past several months claiming that you have had no arrests. You’ll need your birth certificate and school records as well, if I remember correctly. They may need to be officially translated, as well, but I can’t remember that part. In any case, call the Spanish consulate nearest to y our home town or look on the Internet to see what you need. Big note: don’t go to any gov’t building unless you know what documents you need to perform what task you want to get done there. Don’t do like I did - save yourself time!
Anyway, after giving all that documentation, you are supposed to wait in the U.S. as this is processed. After processing, the Spanish consulate will let you know (for me it took from October to May) and then you return to pick up the processed documentation. Then you take the processed documentation to your company in Spain. Then they should tell you to, at the right time, go to the Delegacion de la Policia to process the residency card. You fill out their form with the correct docs (among the obvious things like passport and photos of yourself, you’ll also need a cert of Empadronamiento which states that you officially life in a particular city and house which you get at from the city gov’t or ayuntamiento), and then about a month later they call you to go to a local police station to pick up a card that shows your Permiso de Residencia that has your right to employment written on it. It works ALMOST as a DNI, but it’s for foreigners. It’s a great feeling to finally get this card.
Now, I don’t think I left out any important parts but HAVE SOMEONE ELSE HELP YOU WITH THIS, if you can - another American in Malaga who has done this. The process is difficult and frustrating and the main reason I tell my friends who “are thinking about moving to Spain for a while” to think twice about it. I’m don’t try to discourage anyone, but rather tell people my experience - that even with a great computer management job, I had to wait in line for hours again and again for different forms and approvals. I don’t want to say that I thought I was special, but many times the process is not clear and it’s just plain confusing! I also say this to people because, as U.S. citizens we aren’t usually exposed to such complicated and seemingly disorganized processes. There is no disrespect to Spain whatsoever here, the processes are not disorganized, but they can be difficult to people who are not familiar with them. Be prepared - there is no greeter at these buildings who asks you what you need and directs you to the right form and where to stand in line. You just have to be patient if you stand in the wrong line for four hours…like I did. Doh!!
So, GOOD LUCK, be patient, get help and stick it out and one day you might have permanent residency. I was thrilled the day the Spanish gov’t granted me that!