A foreign person residing in Spain is entitled to apply for citizenship according to his legal status of residence. for example;
Natural immigrant to work after 10 years
Political refugee after 5 years
The immigrant from South America after 2 years.
Marriage to a Spanish after 1 year has passed