Algeria has recalled its ambassador to Spain in protest against Madrid's backing of a Moroccan plan to give autonomy to Western Sahara.
The ex-Spanish colony is disputed between Morocco and the Algeria-backed Polisario Front independence movement.
Algeria condemned Spain's "abrupt U-turn," saying in an official statement Saturday that Spain had previously demonstrated neutrality in the long-running conflict for the land.
Algeria threw its weight behind the Polisario after Morocco's annexation of Western Sahara in 1975.
Spain on Friday backed a Moroccan proposal for Western Sahara to operate autonomously under Rabat's rule, calling it "the most serious, realistic and credible" initiative for resolving a decades-long dispute over the vast African territory.
The Polisario accused Spain of a "grave error" of judgment. It has continued to call for an independence referendum.