According to article 14 of the Spanish Constitution of 1978…
Spaniards are equal before the law, without discrimination based on birth, race, sex, religion, opinion or any other personal or social condition or circumstance.
But it was not always like this. In fact, during the two years that the Spanish Constitution of 1812, approved in Cádiz on March 19, was in force, Spaniards of African origin and the unemployed did not have the same rights as other Spaniards.
In said Constitution it was determined that «The Spanish nation is the meeting of the Spaniards of both hemispheres [Peninsula and adjacent islands vs. Overseas Territories]. And according to article 5 They were Spanish…
1. All free men born and living in the dominions of the Spains, and their children.
2. Foreigners who have obtained a certificate of naturalization from the Cortes.
3. Those who have lived ten years without it, won according to the law in any town of the Monarchy.
4. The freedmen since they acquire freedom in the Spains.
Therefore, it included indigenous people, mestizos, brown castes (those who by any line had African descent) and freedmen... only slaves were excluded.
The electoral legislation to elect the deputies that would form the Ordinary Courts in 1813 was regulated by the Constitution of 1812 itself and the subsequent Decree of the Courts of May 23, 1812, and in both regulations an organization and administrative division of the Peninsula was established. and the overseas territories in 47 constituencies or provinces, in which parliamentarians would be chosen by the proportion of one deputy for every 70,000 inhabitants. In articles 27 and 28 it was determined...
The Cortes are the meeting of all the deputies that the Nation represents, appointed by the citizens and whose representation will be the same in both hemispheres
Despite the attempt to equalize the representation of the overseas territories (territories of the American continent and the Philippines) with the metropolitan ones (Peninsula and adjacent islands), it was very difficult if the parliamentary representation was proportional to the population, since the estimated population of Overseas was 18 million inhabitants compared to 10.5 million metropolitan. So, article 22 it included a "correcting element" to equalize the population and, therefore, the number of deputies. And they did it by differentiating between Spaniards and citizens or, better said, between civil rights and political rights. All Spaniards had full civil rights, but not all Spaniards were citizens (full political rights and, therefore, with the right to vote).
To the Spaniards who by any line are known and reputed to originate from Africa [brown castes] , the door of virtue and merit to be citizens remains open for them:consequently, the Courts will grant a citizen's letter to those who render qualified services to the Homeland, or to those who are distinguished by their talent, application and conduct, with the condition that they are children of legitimate marriage of naive [free] parents; that they are married to a naive woman, and reside in the domains of Spain, and that they exercise some profession, trade or useful industry with their own capital.
So, these Spaniards had to earn the right to vote.
Also, article 25 determines some cases in which citizenship could be suspended and, with it, the right to vote
…to those who do not have a job, trade or known way of life.
After these readjustments and some others included in chapter IV, the population of Overseas was "reduced" to just over 13 million and, in this way, the number of deputies from both hemispheres was equalized.