Please read the information provided by the Spanish government on situations in which a person can acquire Spanish nationality. If (one of) the parents is Spanish, it would be by birth so ´españoles de origen:
Children are entitled to nationality by origin if:
They are Spanish by origin:
Those born to a Spanish father or mother.
Those born in Spain when they are children of foreign parents if at least one of the parents was born in Spain (children of diplomats are excepted).
Those born in Spain of foreign parents, if both lack nationality (stateless), or if the legislation of neither of them attributes a nationality to the child. In this case, a file can be made in the Civil Registry of your home to declare Spanish nationality with the value of simple presumption.
Children born in Spain whose parents’ identity is unknown. Minors whose first known place of stay is Spanish territory are presumed to have been born in Spain.
Those under 18 years of age who are adopted by a Spaniard are also Spaniards of origin. If the adoptee is over 18 years of age, he may opt for Spanish nationality of origin within a period of two years from the constitution of the adoption.
Other children born in Spain of parents without Spanish nationality will be by residence:
Spanish nationality by residence
The same is true for the nationality of the other parent, so it’s up to the parents to decide where to apply for their child’s first passport.
Please note that the Spanish legislation with regards to dual nationality requires a person to renounce most other nationalities except from those countries that have an agreement with Spain.
The Spanish legislation allows dual nationality if on acquiring the second, you are not required to renounce the first. So if you’re not from one of the exempted countries mentioned in the link above, and you want your child to have dual nationality, choosing their first passport is of the essence, to avoid having to renounce when applying for Spanish nationality. (note* This is questionable if from a country without agreement for dual nationality. Myra)
If a child is born from 2 non-Spanish parents, but on Spanish soil, he/she has the right to acquire Spanish nationality after one year of residency, but will have to renounce the previous one in most cases expect for those entitled to dual nationality.
E.g. Child born from British and Spanish parent. Spanish first, British second. And you might have to confirm your desire to maintain the Spanish nationality within 3 years of applying for the other. How you lose Spanish nationality:
How you lose Spanish nationality