The Polisario Front independence movement has accused Spain of making a "grave error" after it changed its position and backed Morocco's autonomy plan for the disputed Western Sahara.
Morocco sees the Western Sahara, a former Spanish colony, with rich phosphate resources and access to lucrative Atlantic fishing waters, as an integral part of its territory.
The Algeria-backed Polisario separatists took up arms in the 1970s and have continued to demand an independence referendum on the basis of a 1991 deal that included a ceasefire.
On Friday, Spanish Foreign Minister Jose Manuel Albares said Morocco's 2007 proposal to offer Western Sahara autonomy was the "most serious, realistic and credible basis" to end the decades-long dispute over the vast territory.
This sparked an angry response from the Polisario, which expressed "surprise" over the move, in a statement released late Friday.
Spain had until now tried to appear neutral on the issue of Western Sahara, a mostly desert region the size of Britain.
"The position expressed by the Spanish government totally contradicts international legitimacy," the Polisario statement said.
The separatists called on political sides in Spain "to exert pressure on the Spanish government to correct this grave error".
"The United Nations, the African Union, the European Union, the International Court of Justice, the European Court of Justice and all regional organisations do not recognise Moroccan sovereignty over the Western Sahara," the movement said.
Earlier this month, the United States reiterated its support for Morocco's plan for autonomy in the Western Sahara.
"We continue to view Morocco's autonomy plan as serious, credible and realistic," US Deputy Secretary of State Wendy Sherman said during a visit to Rabat.
In late 2020, the Trump administration recognised Moroccan sovereignty over Western Sahara as a quid pro quo for the kingdom mending ties with Israel.
The deal sparked renewed tensions with Algeria.
The Biden administration has not reversed Trump's decision.
Ukrainian and Moroccan FMs meet in Rabat
After re-election, Polisario's Ghali vows more Sahrawi resistance
Western Sahara: The Polisario movement's 16th congress set for election
Polisario begin leadership talks in Western Sahara amid rising tensions
Polisario Front members meet in Algeria to discuss leadership elections
Go to video
Morocco-Spain high level meeting confirmed for February 1 in Rabat