The Spanish Constitution states that justice will be free to those who can prove that they do not have sufficient resources for litigation.
A document explaining the procedure and how to apply has been issued by the British Consulate in Madrid. View the document here.