Thank you for reaching out to us today and Welcome to Wefugees!
There is a website by "Barcelona Ciutat Refugi" with all the information you need about asylum in Spain, who is eligible, what steps you need to take, social benefits you may get, etc. Please have a look on there for more information: http://ciutatrefugi.barcelona/en/international-protection-and-asylum-seeking-spain
This is what they generally say about who is eligible:
"Spain's Regulatory Act 12/2009 on the Right to Asylum and Subsidiary Protection in Spain accords refugee status to anyone with a justified fear of persecution in their own country for reasons of race, religion, nationality, political views or belonging to a specific social group, gender or sexual orientation.
It also recognises as stateless any person who has no nationality, is outside their country of normal residence and either does not wish or is unable to return to that country for any of the above reasons."
Here is another website (asylum in europe) that explains the regular procedure in Spain: https://www.asylumineurope.org/reports/country/spain/short-overview-asylum-procedure
I hope this information helps. Feel free to reach out to us again if you need any further assistance!