Spain’s lower house of parliament has approved a bill granting citizenship to tens of thousands of individuals born in Western Sahara, a contested territory claimed by Morocco. The measure, which passed with 168 votes in favor, 31 against, and 145 abstentions, was proposed by Sumar, a left-wing party in Prime Minister Pedro Sánchez’s governing coalition. It now awaits confirmation by the Senate.

The legislation aims to recognize the nationality of people born in Western Sahara before 1977 and their descendants, addressing a longstanding legal and political limbo stemming from the territory’s complex decolonization process. Spain administered Western Sahara until 1976, and Sumar officials described the bill as a way to redress a “historical debt” to the Sahrawi people, whose status remains unresolved amid the ongoing sovereignty dispute.

Western Sahara, a desert region roughly the size of the United Kingdom, has been the subject of competing claims between Morocco and the Sahrawi independence movement. Morocco annexed much of the territory following Spain’s withdrawal and asserts sovereignty over it. Spain’s official position has shifted over recent years, with Madrid endorsing Morocco’s autonomy proposal for the region in 2022, a move that followed an earlier migration crisis involving thousands of migrants arriving from Morocco to the Spanish enclave of Ceuta.

Opposition to the bill came chiefly from the right. The conservative People’s Party abstained, expressing support for restoring nationality to Sahrawis only through residency requirements rather than an outright citizenship decree. The far-right Vox party voted against the legislation, arguing that it could undermine the integrity of Spanish nationality and weaken border controls. Vox and other anti-immigration groups have criticized Sánchez’s broader immigration policies, including a separate amnesty law passed earlier this year that permits over one million individuals to regularize their status in Spain.

Morocco is expected to view the citizenship bill as a serious challenge to its claim over Western Sahara, a cornerstone of its foreign policy and national identity. Samir Bennis, co-founder of the Morocco World News website, warned that the law could provoke a diplomatic crisis and serve as a platform for Sahrawi separatism within Spain.

The United Nations still classifies Western Sahara as a non-self-governing territory. However, international efforts to hold a referendum on its final status have been stalled for decades, with Morocco progressively securing wider recognition of its autonomy plan. The recent Spanish parliamentary move is likely to further complicate relations between Madrid and Rabat, which have already been strained following migration tensions earlier this year.